← All recipes
Moderne licensed

Find Context.Consumer usage

Recipe IDorg.openrewrite.react.19.find-context-consumerArtifact@openrewrite/recipes-react

Finds usage of the deprecated <Context.Consumer> pattern. In React 19, use the use() hook 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-context-consumer

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

mod config recipes npm install @openrewrite/recipes-react