← All recipes
Moderne licensed

Upgrade to React 19

Recipe IDorg.openrewrite.react.migrate.upgrade-to-react-19Artifact@openrewrite/recipes-react

Migrate deprecated and removed APIs for React 19 compatibility. This includes removing forwardRef, updating Context.Provider usage, replacing useContext with use, and other breaking changes.

Composite recipeProprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.react.migrate.upgrade-to-react-19

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/recipes-react

Definition

This recipe runs the following recipes in order.