Replace React.createFactory with React.createElement
Recipe ID
org.openrewrite.react.16.replace-create-factoryArtifact@openrewrite/recipes-reactReplaces React.createFactory(type)(props, children) with React.createElement(type, props, children). React.createFactory was deprecated in React 15.6 and removed in React 16.
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.16.replace-create-factoryIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/recipes-react