Replace ReactDOM.render with createRoot
ProprietaryMigrates a top-level ReactDOM.render() call to the createRoot() API from react-dom/client introduced in React 18, creating the root once. Calls inside functions, calls whose result is used and containers that are rendered more than once are marked for manual migration.
org. openrewrite. react.18. replace-reactdom-rendermod run . --recipe= org. openrewrite. react.18. replace-reactdom-renderInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.