← All recipes
Moderne licensed

Find element.ref access

Recipe IDorg.openrewrite.react.19.find-element-refArtifact@openrewrite/recipes-react

Finds direct access of element.ref on React elements. In React 19, element.ref is deprecated; use element.props.ref instead.

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.find-element-ref

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

mod config recipes npm install @openrewrite/recipes-react