Remove unnecessary React imports
Recipe ID
org.openrewrite.react.17.update-react-importsArtifact@openrewrite/recipes-reactRemoves the default import React from 'react' when React is only used for JSX, which is no longer necessary with the new JSX transform in React 17+.
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.17.update-react-importsIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-react