← All recipes
Moderne licensed

Replace React.createFactory with React.createElement

Recipe IDorg.openrewrite.react.16.replace-create-factoryArtifact@openrewrite/recipes-react

Replaces 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-factory

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

mod config recipes npm install @openrewrite/recipes-react