Upgrade from React 17 to React 19#28
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
- Update react, react-dom to ^19.0.0 - Update @testing-library/react to ^16.0.0, jest-dom to ^6.0.0, user-event to ^14.0.0 - Add @testing-library/dom (peer dependency for @testing-library/react v16) - Update web-vitals to ^4.0.0 (getFID -> onINP, getCLS -> onCLS, etc.) - Migrate entry point from ReactDOM.render() to createRoot() API - Add nodeRef prop to CSSTransition in Modal and Alert components - Fix test to wrap App in AlertProvider and test actual Wordle UI 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:
|
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 to React 19, including all related dependency updates, entry point migration, deprecated API removal, and test fixes.
Changes
Dependency updates (
package.json):react/react-dom:^17.0.2→^19.0.0@testing-library/react:^12.1.4→^16.0.0@testing-library/jest-dom:^5.16.3→^6.0.0@testing-library/user-event:^13.5.0→^14.0.0@testing-library/domadded (peer dep for@testing-library/reactv16)web-vitals:^2.1.4→^4.0.0react-scripts5.0.0 kept (works with--legacy-peer-deps)react-transition-group^4.4.2 kept (compatible with React 19 when usingnodeRef)react-countdown^2.3.2 kept (compatible)Entry point (
src/index.js):ReactDOM.render()tocreateRoot()APICSSTransition nodeRef (
src/components/Modal/Modal.jsx,src/components/Alert/Alert.jsx):nodeRefprop to all<CSSTransition>components to avoid removedfindDOMNodeweb-vitals (
src/reportWebVitals.js):getCLS,getFID, etc.) to v4 API (onCLS,onINP, etc.)Tests (
src/App.test.jsx):AppinAlertProvider(required context)Screenshots
How to play modal (fade transition working):

Game board after closing modal:

Review & Testing Checklist for Human
npm startand verify the game loads, plays, and animations (tile flips, modal fades, alert fades) all work correctlyNotes
react-scripts5.0.0 is kept and works with--legacy-peer-deps. A future Vite migration may be beneficial but is not required for React 19 compatibility.defaultProps,propTypes,string refs, or legacy context usage was found in the codebase — no removals needed.npm test,npm run build,npm run check(prettier).Link to Devin session: https://app.devin.ai/sessions/00d9c9de8fb844a5a1a6c2736abad001
Devin Review