← All recipes
Moderne licensed

Replace react-test-renderer/shallow import

Recipe IDorg.openrewrite.react.19.replace-react-shallow-rendererArtifact@openrewrite/recipes-react

Changes import of shallow renderer from react-test-renderer/shallow to the standalone react-shallow-renderer package, as it was removed from React 19.

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-react-shallow-renderer

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

mod config recipes npm install @openrewrite/recipes-react