redux-toolkit icon indicating copy to clipboard operation
redux-toolkit copied to clipboard

Migrate to React 19

Open aryaemami59 opened this issue 1 year ago • 3 comments

This PR:

  • [X] Updates react and react-dom to v19 beta.
  • [X] Sets 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.
  • [X] 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.
  • [X] Updates @testing-library/react to latest version.
  • [X] Updates @testing-library/user-event to latest version.
  • [X] Adds latest version of @testing-library/dom.
  • [X] Replaces the now removed ReactDOM.render calls with the render function from @testing-library/react as recommended in the React 19 migration guide.
  • [X] Replaces the now removed ReactDOM.unmountComponentAtNode calls with the cleanup function from @testing-library/react as recommended in the React 19 migration guide.
  • [X] Removes redundant act wrappers around fireEvent method calls since they are already wrapped in act calls.
  • [X] Expands version ranges of react in peerDependencies to include version 19.
  • [X] Updates React-related code snippets in docs.
  • [X] Fixes some issues related to console spies.
  • [X] Fixes some issues related to stubbing environments.
  • [X] Fixes some issues related to act warnings emitted by @testing-library/react.
  • [X] Fixes some issues related to sinon fake timers.

aryaemami59 avatar May 14 '24 17:05 aryaemami59