Use case
Framework
Owner
React/19/Migration Recipe
This recipe is a set of codemods that will fix some of React 19 breaking changes.
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Replace Create Factory
Replaces deprecated
React.createFactory
method with JSX.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/Replace React Fc Typescript
This codemod removes
React.FC
,React.FunctionComponent
andReact.SFC
and replaces the Props as the type of the unique argument in the component definition.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/Prop Types Typescript
Codemod to convert React PropTypes to TypeScript types.
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Use Context Hook
This codemod will convert the usage of
useContext
to the new hook format, introduced in React v19.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Replace Use Form State
This codemod will replace the usages of
useFormState()
to useuseActionState()
, introduced in React v19.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Replace String Ref
This codemod migrates string refs (deprecated) to callback refs.
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Replace Reactdom Render
- Replaces usages of
ReactDom.render()
withcreateRoot(node).render()
. - Replaces usages of
ReactDom.hydrate()
withhydrateRoot()
- Replaces usages of
ReactDom.unmountComponentAtNode()
withroot.unmount()
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
- Replaces usages of
React/19/Replace React Test Renderer Import
Replaces
react-test-renderer/shallow
import.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Replace Default Props
Replaces default props with ES6 default parameters.
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Replace Act Import
This codemod will replace the usages of
TestUtils.act()
to useReact.act()
, introduced in React v19.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Remove Memoization
This codemod will remove manual memoization hooks:
useCallback
,useMemo
andmemo
. This codemod goes hand in hand with React Compiler.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Remove Legacy Context
Removes legacy context methods
childContextTypes
andgetChildContext
from react class component. Wraps rendered children with Context.Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Remove Forward Ref
React.forwardRef will be deprecated for Function Components in near future. This codemod removes forwardRef function.
Codemod verified
Regularly tested and maintained by our engineers and codemod expert community
React/19/Remove Context Provider
This codemod will remove the usage of
Provider
for contexts; e.g., Context.Provider to ContextCodemod verified
Regularly tested and maintained by our engineers and codemod expert community
Classnames To Clsx
Converts
classnames
toclsx
.