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

Migrate to React 19 #4409

Merged
merged 43 commits into from
Dec 11, 2024
Merged

Conversation

aryaemami59
Copy link
Contributor

@aryaemami59 aryaemami59 commented May 14, 2024

This PR:

  • Updates react and react-dom to v19.
  • Sets the @types/react and @types/react-dom to v19 according to the React 19 migration guide.
  • Runs tests against different versions of React during CI. Not sure if we want to keep this addition but for now it serves as a way for us to make sure the changes we make are non-breaking and can work with both React 18 and 19.
  • Updates @testing-library/react to latest version.
  • Updates @testing-library/user-event to latest version.
  • Adds latest version of @testing-library/dom.
  • Replaces the now removed ReactDOM.render calls with the render function from @testing-library/react as recommended in the React 19 migration guide.
  • Replaces the now removed ReactDOM.unmountComponentAtNode calls with the unmount function from @testing-library/react as recommended in the React 19 migration guide.
  • Removes redundant act wrappers around fireEvent method calls since they are already wrapped in act calls.
  • Expands version ranges of react in peerDependencies to include version 19.
  • Updates React-related code snippets in docs.
  • Fixes some issues related to console spies.
  • Fixes some issues related to stubbing environments.
  • Fixes some issues related to act warnings emitted by @testing-library/react.
  • Fixes some issues related to sinon fake timers.

Copy link

codesandbox bot commented May 14, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

codesandbox-ci bot commented May 14, 2024

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.

Latest deployment of this branch, based on commit 19acec8:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

Copy link

netlify bot commented May 14, 2024

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit 19acec8
🔍 Latest deploy log https://app.netlify.com/sites/redux-starter-kit-docs/deploys/6758e70a3ab5800008577a3f
😎 Deploy Preview https://deploy-preview-4409--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@aryaemami59 aryaemami59 force-pushed the migrate-to-react-19 branch from ec60b9a to c1c42eb Compare May 16, 2024 11:57
@aryaemami59 aryaemami59 force-pushed the migrate-to-react-19 branch from 60fa41a to 48084da Compare June 21, 2024 12:22
@aryaemami59 aryaemami59 force-pushed the migrate-to-react-19 branch 7 times, most recently from ad370d1 to 9abb7ac Compare August 27, 2024 14:19
@aryaemami59 aryaemami59 force-pushed the migrate-to-react-19 branch 3 times, most recently from bc3b72b to 8fb2a7c Compare September 13, 2024 22:37
@aryaemami59 aryaemami59 force-pushed the migrate-to-react-19 branch 9 times, most recently from 0216535 to a80512a Compare September 24, 2024 14:08
@aryaemami59 aryaemami59 force-pushed the migrate-to-react-19 branch 3 times, most recently from 7bca2a8 to 4f645a8 Compare October 9, 2024 01:22
- We set the `@types/react` and `@types/react-dom` package resolutions to `npm:types-react` and `npm:types-react-dom` according to the React 19 migration guide.
- This was done to make sure `toHaveBeenCalledWith` will fail if we pass in the wrong Error constructor. For example the assertion will now fail if we pass in an `Error` instead of a `TypeError`.
- This was done because it was causing the unit tests in example workspaces to fail.
@markerikson markerikson merged commit 40b8aed into reduxjs:master Dec 11, 2024
47 checks passed
@aryaemami59 aryaemami59 deleted the migrate-to-react-19 branch December 11, 2024 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants