Registry
Ccodemod-com-bot avatar

react-19-replace-create-factory

Replace deprecated React.createFactory calls with JSX

codemod-com-bot38 executions

  • React
  • createFactory
  • JSX
Connect a repo
npx codemod react-19-replace-create-factory

react-19-replace-create-factory

Replace deprecated React.createFactory(...) and createFactory(...) calls with JSX.

This codemod mirrors react/19/replace-create-factory from codemod/commons.

Usage

bash
npx codemod react-19-replace-create-factory --target <path>

Example

Before

tsx
import { createFactory } from "react";

const route = createFactory(Route);

After

tsx
const route = <Route />;

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.