← All recipes
Moderne licensed

Replace string refs with callback refs

Recipe IDorg.openrewrite.react.19.replace-string-refArtifact@openrewrite/recipes-react

String refs are removed in React 19. This recipe converts them to callback refs.

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.replace-string-ref

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

mod config recipes npm install @openrewrite/recipes-react