-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Make React 19 the default version for development #12177
Conversation
|
✅ Docs Preview ReadyNo new or changed pages found. |
commit: |
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
size-limit report 📦
|
@@ -0,0 +1,15 @@ | |||
// Shim for React 17 react-dom/client entrypoint imported by React Testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out that react-dom/client
was imported by RTL in our v17 tests which actually used the v18 import. When upgrading to v19, that import no longer works, presumably because its using the React 19 react-dom/client
file, but with React 17 core.
This shim adds an entrypoint for react-dom/client
that doesn't exist in 17 to satisfy the import path and avoid using the React 19 version. We throw to ensure the legacyRoot
option is set in the tests though, which should be covered by the patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good call!
0a86aa8
to
782ed67
Compare
Updates our dependencies and types so that React 19 is the default version