← All recipes
Moderne licensed

Sort React component methods

Recipe IDorg.openrewrite.react.refactoring.sort-compArtifact@openrewrite/recipes-react

Reorders React component methods to follow the recommended lifecycle ordering convention.

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.refactoring.sort-comp

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

mod config recipes npm install @openrewrite/recipes-react