Upgrade React 17 to React 18
Migrate a React application to v18 with the new root API and concurrency behavior.
category:modernization
react
frontend
upgrade
workflow
multi-step
0
Prompt
This workflow ensures you adopt React 18 safely, handling the new rendering semantics and strict mode quirks. ## Steps: 1. Update react and react-dom to version 18 in package.json. 2. Replace ReactDOM.render with createRoot in your entry file. 3. Audit StrictMode behavior and resolve double-render side effects. 4. Update Suspense boundaries and lazy-loaded components where needed. 5. Test hydration for server-rendered routes and fix mismatches. 6. Enable optional concurrent features on non-critical screens and measure impact. 7. Run visual regression tests to ensure no unexpected UI changes.