Upgrade from React 17 to 18
ProprietaryMove a React 17 codebase to React 18: replace ReactDOM.render with createRoot, remove unstable_batchedUpdates wrappers, replace unmountComponentAtNode, remove render callbacks, and declare children on props types for @types/react 18. Unlike upgrade-to-react-18, this does not re-run the migrations of earlier majors, so it moves a project that is already on React 17 exactly one major version.
org. openrewrite. react. migrate. react-17-to-18mod run . --recipe= org. openrewrite. react. migrate. react-17-to-18Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.