Upgrade from React 18 to 19

Proprietary

Move a React 18 codebase to React 19: remove forwardRef, React.FC, Context.Provider, defaultProps and propTypes, replace useContext with use, useFormState with useActionState, string refs and ReactDOM.hydrate, and update deprecated types. Unlike upgrade-to-react-19, this does not re-run the migrations of earlier majors, so it moves a project that is already on React 18 exactly one major version.

org.openrewrite.react.migrate.react-18-to-19
mod run . --recipe=org.openrewrite.react.migrate.react-18-to-19

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.