Remove React.forwardRef wrapper
Recipe ID
org.openrewrite.react.19.remove-forward-refArtifact@openrewrite/recipes-reactReact.forwardRef is deprecated for Function Components in React 19. This recipe removes the forwardRef wrapper and converts ref to a regular prop.
Single 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.19.remove-forward-refIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-react