Find React prop usage
Recipe ID
org.openrewrite.react.search.find-prop-usageArtifact@openrewrite/recipes-reactFinds all prop usages on React JSX elements, with optional filtering by component and prop name.
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.search.find-prop-usageIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-reactOptions
| Name | Type | Description |
|---|---|---|
componentName | | Optional component name to filter (e.g., 'Button'). If not specified, finds props on all components. e.g. Button |
propName | | Optional prop name to filter (e.g., 'onClick'). If not specified, finds all props. e.g. onClick |