• React/19/Replace React Test Renderer Import

    Replaces react-test-renderer/shallow import.

  • React/19/Improvements Recipe

    This recipe is a set of codemods that will add improvements available in React 19 to your project.

  • React/19/Migration Recipe

    This recipe is a set of codemods that will fix some of React 19 breaking changes.

  • React/Update React Imports

    As of Babel 7.9.0, when using runtime: automatic in @babel/preset-react or @babel/plugin-transform-react-jsx, you will not need to explicitly import React for compiling jsx. This codemod removes the redundant import statements. It also converts default imports (import React from 'react') to named imports (e.g. import { useState } from 'react').

  • React/Rename Unsafe Lifecycles

    Adds UNSAFE_ prefix for deprecated lifecycle hooks. (For more information about this codemod, see React RFC #6)

  • React/React To React Dom

    Updates code for the split of the react and react-dom packages (e.g., React.render to ReactDOM.render).

  • React/React PropTypes To Prop Types

    Replaces React.PropTypes references with prop-types and adds the appropriate import or require statement. This codemod is intended for React 15.5+.

  • React/React DOM To React Dom Factories

    Converts calls like React.DOM.div(...) to React.createElement('div', ...).

  • React/Pure Render Mixin

    Removes PureRenderMixin and inlines shouldComponentUpdate so that the ES2015 class transform can pick up the React component and turn it into an ES2015 class.

  • React/Pure Component

    Converts ES6 classes that only have a render method, only have safe properties (statics and props), and do not have refs to Functional Components.

  • React/Manual Bind To Arrow

    Converts manual function bindings in a class (e.g., this.f = this.f.bind(this)) to arrow property initializer functions (e.g., f = () => {}).

  • React/FindDOMNode

    Updates this.getDOMNode() or this.refs.foo.getDOMNode() calls inside of React.createClass components to React.findDOMNode(foo).

  • React/Error Boundaries

    Renames the experimental unstable_handleError lifecycle hook to componentDidCatch.

  • React/Create Element To Jsx

    Converts calls to React.createElement into JSX elements.

  • React/19/Remove Context Provider

    This codemod will remove the usage of Provider for contexts; e.g., Context.Provider to Context

  • React/19/Replace String Ref

    This codemod migrates string refs (deprecated) to callback refs.

  • Classnames To Clsx

    Converts classnames to clsx.

  • React/19/Replace Reactdom Render

    • Replaces usages of ReactDom.render() with createRoot(node).render().
    • Replaces usages of ReactDom.hydrate() with hydrateRoot()
    • Replaces usages of ReactDom.unmountComponentAtNode() with root.unmount()
  • React/Replace React Fc Typescript

    This codemod removes React.FC, React.FunctionComponent and React.SFC and replaces the Props as the type of the unique argument in the component definition.

  • React/Prop Types Typescript

    Codemod to convert React PropTypes to TypeScript types.