Find React component
Recipe ID
org.openrewrite.react.search.find-react-componentArtifact@openrewrite/recipes-reactFinds all usages of a specific React component including imports, JSX elements, and exports.
Single recipeProprietary
Usage
You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.react.search.find-react-component --recipe-option "componentName=Button"If the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-reactOptions
| Name | Type | Description |
|---|---|---|
componentNamerequired | | The name of the React component to find (e.g., 'Button', 'TextField') e.g. Button |
importPath | | Optional module path to narrow the search (e.g., '@mui/material'). Supports glob patterns. e.g. @mui/material |