Codemod verified
Regularly tested and maintained by our engineers and codemod expert community.
React
migration
byCodemod
React/19/Remove Forward Ref
Last update
Sep 29, 2024
React.forwardRef will be deprecated for Function Components in near future. This codemod removes forwardRef function.
Before:
import { forwardRef } from 'react';const MyInput = forwardRef(function MyInput(props, ref) {// ...});
After:
const MyInput = function MyInput({ ref, ...props }) {// ...};
Build custom codemods
Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community