-
-
Couldn't load subscription status.
- Fork 3.3k
Migrate to React 19 #2172
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
Migrate to React 19 #2172
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
b7877bc to
93b6f07
Compare
✅ Deploy Preview for react-redux-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
923eff2 to
53261de
Compare
1ed9e74 to
ac01df2
Compare
67a048a to
258edeb
Compare
f219d06 to
5d32aee
Compare
054b5fc to
55e7d62
Compare
55e7d62 to
f0063bf
Compare
f0063bf to
a38fd8f
Compare
|
Merged in #2216 , which is a copy-paste of this PR's commits into a new branch inside this repo. Same work, different PR number! |
Superseded by #2216 (same code, new branch)
This PR:
reactandreact-domto v19.@types/reactand@types/react-domto v19 according to the React 19 migration guide.react-test-rendererpackage as recommended in the React 19 migration guide.@testing-library/reactto latest version.@testing-library/jest-domto latest version.ReactDOM.rendercalls with therenderfunction from@testing-library/reactas recommended in the React 19 migration guide.ReactDOM.unmountComponentAtNodecalls with theunmountfunction from@testing-library/reactas recommended in the React 19 migration guide.renderHookfunction from@testing-library/react-hooksto@testing-library/reactas recommended by A Note about React 18 Support and react-hooks-testing-library React 18 Migration guide.@testing-library/react-hookspackage.renderHookcalls according to react-hooks-testing-library React 18 Migration guide.react-isimplementation.Click to expand
In [PR#28813](https://github.com/Rename the react.element symbol to react.transitional.element facebook/react#28813) `react-is` changed the `REACT_ELEMENT_TYPE` symbol from `'react.element'` to `'react.transitional.element'`. We want our changes to be non-breaking and backwards-compatible so we conditionally set the `REACT_ELEMENT_TYPE` based on the detected version of React. While this is not ideal, the `react-is` package is `CJS` and not very tree-shakable. So for now we want to inline it as to not add unnecessary weight to bundle sizes, not to mention the conditional React version check helps keep our changes backwards-compatible.react-isrelated detailsrtl.cleanupfunction calls insideafterEachhooks as per@testing-library/reactdocs, it is done automatically.reactand@types/reactinpeerDependenciesto include version 19.