Upgrade from React 17 to React 19#17
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
Conversation
- Update react and react-dom from ^17.0.2 to ^19.0.0 - Update @testing-library/react from ^12.1.4 to ^16.1.0 (React 19 compat) - Update react-countdown from ^2.3.2 to ^2.3.6 - Update react-scripts from 5.0.0 to 5.0.1 - Migrate src/index.js from ReactDOM.render() to createRoot API Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
ReactDOM.findDOMNode was removed in React 19. Add nodeRef prop to CSSTransition components in Modal and Alert to avoid the error. Co-Authored-By: shahmir.masood <shahmir.masood@cognition.ai>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Upgrades the project from React 17 (
^17.0.2) to React 19 (^19.0.0), including all necessary dependency updates and API migrations.Changes
Dependencies (
package.json):^17.0.2→^19.0.0^12.1.4→^16.1.0(required for React 19createRootcompatibility)^2.3.2→^2.3.65.0.0→5.0.1Root API migration (
src/index.js):ReactDOM.render()withcreateRootAPI fromreact-dom/clientreact-transition-group compatibility (
src/components/Modal/Modal.jsx,src/components/Alert/Alert.jsx):nodeRefprop to allCSSTransitioncomponents to replaceReactDOM.findDOMNode(removed in React 19)Codebase audit
Scanned
src/for other deprecated patterns — none found:ReactDOM.unmountComponentAtNodeor additionalReactDOM.findDOMNodecallscontextTypes,childContextTypes)componentWillMount, etc.)React.FCwith implicitchildrenpropPre-existing test failure
The existing test (
App.test.jsx) was already failing onmainbefore this upgrade — it renders<App />without the requiredAlertProvidercontext wrapper. This is unrelated to the React 19 upgrade.Review & Testing Checklist for Human
npm startand verify the Wordle game loads and plays correctlyCSSTransitionwithnodeRef)Notes
npm run build) compiles successfullyLink to Devin session: https://app.devin.ai/sessions/d4346cb86c254c0e8b0d4289d02378b3
Requested by: @shahmir-masood
Devin Review