React/19/Remove Forward Ref

1.0.8Last update Sep 29, 2024
by@Codemod
React
migration

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

background illustrationGet Started Now