-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Support React 19 in App and Pages router #65058
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
618ceee
Start syncing with Beta
eps1lon 84ef617
Update React from c3048aab4 to 4508873393
eps1lon cf89684
Minified bundles were removed
eps1lon 41a97c3
Use `react-dom` directly instead of server-rendering-stub
eps1lon 6e8445c
Inline tests for integration/react-18
eps1lon 2009625
Alias JSX runtime
eps1lon 37cf4c9
Use React 19 everywhere
eps1lon 7c388cf
Resolve findDOMNode breaking changes
eps1lon 6cd9405
useFormState -> useActionState
eps1lon 603dc09
Again the react vs next/dist/compiled/react shenanigans
eps1lon 0d0aa62
Implement fetch cache
eps1lon 82f1e90
Fix aliases in vendored React
eps1lon 7cb4d22
Fix image tests
eps1lon dd32f40
Update tests assuming React.cache works on the client
eps1lon 2275c7d
Work around React bugs
eps1lon d6699ee
Disable StrictMode tests
eps1lon 6ed9c92
Disable tests that already failed experimental React
eps1lon 37338f1
Update test assuming we use Canary
eps1lon 8e17b5e
Stop using legacy root
eps1lon 7a62dc7
Pages Router: Fix error overlay
eps1lon 64aa113
Adjust tests now that `enableFilterEmptyStringAttributesDOM` has landed
eps1lon 5664c85
Fix profiling aliases
eps1lon 92ca39b
Use Float for image preloading in `next/legacy/image`
eps1lon e7ce7c0
Port create-compiler-aliases to Turbopack
eps1lon cb1c174
Update compiled
eps1lon 8ec7f27
Collapse if because that's what Clippy wants
eps1lon 7659179
custom scripts fail AMP validation now
eps1lon d7c9949
Apply react 19 stack and diff (#65276)
huozhi 30628ff
Restore collapse/expand for hydration diffs
eps1lon d453769
Pages router handles hydration errors as runtime errors
eps1lon 330b523
Stop using next/head for scripts
eps1lon 12b9753
Ignore tests using react-relay
eps1lon 2cc6777
Use next/script the way `next/head > script` behaved
eps1lon 3e4de91
Browser seems to miss hydration some errors now
eps1lon 635e901
Charset is now floated to the start in React 19
eps1lon 71ab968
Float breaks loose head reconciler
eps1lon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...ustom-transforms/tests/errors/react-server-components/server-graph/react-dom-api/input.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...stom-transforms/tests/errors/react-server-components/server-graph/react-dom-api/output.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 18 additions & 17 deletions
35
...-transforms/tests/errors/react-server-components/server-graph/react-dom-api/output.stderr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,49 @@ | ||
|
||
x You're importing a component that needs findDOMNode. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default. | ||
x You're importing a component that needs flushSync. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default. | ||
| Learn more: https://nextjs.org/docs/getting-started/react-essentials | ||
| | ||
| | ||
,-[input.js:1:1] | ||
1 | import { findDOMNode, flushSync, unstable_batchedUpdates } from 'react-dom' | ||
: ^^^^^^^^^^^ | ||
1 | import { flushSync, unstable_batchedUpdates } from 'react-dom' | ||
: ^^^^^^^^^ | ||
`---- | ||
|
||
x You're importing a component that needs flushSync. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default. | ||
x You're importing a component that needs unstable_batchedUpdates. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by | ||
| default. | ||
| Learn more: https://nextjs.org/docs/getting-started/react-essentials | ||
| | ||
| | ||
,-[input.js:1:1] | ||
1 | import { findDOMNode, flushSync, unstable_batchedUpdates } from 'react-dom' | ||
: ^^^^^^^^^ | ||
1 | import { flushSync, unstable_batchedUpdates } from 'react-dom' | ||
: ^^^^^^^^^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x You're importing a component that needs unstable_batchedUpdates. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by | ||
| default. | ||
x You're importing a component that needs useActionState. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default. | ||
| Learn more: https://nextjs.org/docs/getting-started/react-essentials | ||
| | ||
| | ||
,-[input.js:1:1] | ||
1 | import { findDOMNode, flushSync, unstable_batchedUpdates } from 'react-dom' | ||
: ^^^^^^^^^^^^^^^^^^^^^^^ | ||
,-[input.js:2:1] | ||
2 | | ||
3 | import { useActionState } from 'react' | ||
: ^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x You're importing a component that needs useFormStatus. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default. | ||
| Learn more: https://nextjs.org/docs/getting-started/react-essentials | ||
| | ||
| | ||
,-[input.js:2:1] | ||
2 | | ||
3 | import { useFormStatus, useFormState } from 'react-dom' | ||
,-[input.js:4:1] | ||
4 | | ||
5 | import { useFormStatus, useFormState } from 'react-dom' | ||
: ^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x You're importing a component that needs useFormState. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default. | ||
| Learn more: https://nextjs.org/docs/getting-started/react-essentials | ||
| | ||
| | ||
,-[input.js:2:1] | ||
2 | | ||
3 | import { useFormStatus, useFormState } from 'react-dom' | ||
,-[input.js:4:1] | ||
4 | | ||
5 | import { useFormStatus, useFormState } from 'react-dom' | ||
: ^^^^^^^^^^^^ | ||
`---- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.