Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rsc): upgrade to react canary #10194

Merged
merged 15 commits into from
Mar 17, 2024
Merged

chore(rsc): upgrade to react canary #10194

merged 15 commits into from
Mar 17, 2024

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented Mar 11, 2024

Want to see how CI reacts to upgrading to React canary. I may have over-upgraded (i.e. some fixtures and maybe the docs don't need to be upgraded), but let's see what happens.

This upgrade was complicated by facebook/react#27436 which added a poisoned import to react-server-dom-webpack/server, meaning that if you tried to import from that entry point without the "react-server" condition, it would throw.

In a much-earlier PR, Sebastian mentions there generally being two ways to do things:

Either you can have the server code prebundled using Webpack (what Next.js does in practice) or you can use an unbundled Node.js server (what the reference implementation does).

See facebook/react#26172.

This PR goes with the former, prebundling react-server-dom-webpack/server with the "react-server" condition so that we can avoid having to specify it at runtime. It's hard to tell if this the better option long-term, but since we're keen on getting rid of the worker right now, this moves us closer in that direction. The alternative solution was to move decoding the reply into the worker where the condition is specified.

@jtoar jtoar added the release:chore This PR is a chore (means nothing for users) label Mar 11, 2024
@jtoar jtoar added this to the RSC milestone Mar 11, 2024
@jtoar jtoar force-pushed the ds-rsc/upgarde-to-react-canary branch 2 times, most recently from 5baa36b to 09a968d Compare March 12, 2024 08:38
jtoar added a commit that referenced this pull request Mar 15, 2024
…ions (#10229)

Upgrading to the canary versions of the react packages in
#10194 is confounded by the
fact that a Redwood project's web-side package.json requests versions
18.2.0. Our sync commands should be setting the resolutions of those
packages as well as the Redwood ones. This PR updates `yarn rwfw
project:tarsync` to set resolutions for `react` and `react-dom`.
@jtoar jtoar force-pushed the ds-rsc/upgarde-to-react-canary branch 2 times, most recently from 05982d2 to 6ab737a Compare March 16, 2024 22:22
@jtoar jtoar marked this pull request as ready for review March 16, 2024 23:00
@jtoar jtoar force-pushed the ds-rsc/upgarde-to-react-canary branch 2 times, most recently from dab5b7f to 431e1e7 Compare March 17, 2024 12:06
@jtoar jtoar force-pushed the ds-rsc/upgarde-to-react-canary branch from 431e1e7 to b0966d1 Compare March 17, 2024 12:37
@jtoar jtoar added the changesets-ok Override the changesets check label Mar 17, 2024
@jtoar jtoar merged commit 93459f9 into main Mar 17, 2024
44 checks passed
@jtoar jtoar deleted the ds-rsc/upgarde-to-react-canary branch March 17, 2024 16:33
@Josh-Walker-GM Josh-Walker-GM modified the milestones: RSC, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changesets-ok Override the changesets check release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants