React 18 to React 19 Migration Diff
Track all dependency changes needed when migrating from React 18 to React 19, including related packages like react-dom, types, and testing libraries.
Detailed Explanation
React 18 to 19 Migration
Migrating to a new major React version involves updating not just react itself but an entire ecosystem of related packages. The Package.json Diff tool helps you visualize all these changes at once.
Typical React 18 to 19 diff
dependencies:
~ react: ^18.2.0 -> ^19.0.0 [MAJOR]
~ react-dom: ^18.2.0 -> ^19.0.0 [MAJOR]
~ next: ^14.0.0 -> ^15.0.0 [MAJOR]
~ @tanstack/react-query: ^4.36.0 -> ^5.0.0 [MAJOR]
devDependencies:
~ @types/react: ^18.2.0 -> ^19.0.0 [MAJOR]
~ @types/react-dom: ^18.2.0 -> ^19.0.0 [MAJOR]
~ @testing-library/react: ^14.0.0 -> ^16.0.0 [MAJOR]
- @types/react-test-renderer: ^18.0.0 [REMOVED]
Packages affected by React major updates
| Category | Packages to update |
|---|---|
| Core | react, react-dom |
| Types | @types/react, @types/react-dom |
| Framework | next, remix, gatsby |
| State management | @tanstack/react-query, zustand |
| Testing | @testing-library/react |
| UI libraries | @mui/material, @chakra-ui/react |
Migration strategy
- Use this tool to create a before snapshot of your package.json
- Update packages incrementally
- Compare the result to verify all expected changes
- Filter by Changed only to see every version bump
- Look for unexpected MAJOR bumps in unrelated packages
What to watch for
- Multiple MAJOR bumps are expected in a React migration
- Some packages may need to be removed entirely (deprecated APIs)
- New packages may need to be added (e.g., new compiler packages)
- Script changes may be needed if build tools change
Use Case
A frontend team is planning a React 18 to 19 migration for their Next.js application. They create the target package.json with all updated versions and use the diff tool to generate a comprehensive list of changes for their migration plan document.
Try It — Package.json Diff
Related Topics
Major Version Upgrade: Detecting Breaking Changes
Version Analysis
TypeScript Version Upgrade Impact Analysis
Version Analysis
ESLint Major Version Migration (v8 to v9)
Framework Migration
Tracking New Dependencies Added to a Project
Dependency Management
Comparing devDependency Changes Separately
Development Tooling