react-19-replace-use-form-state
Rename useFormState to useActionState in react-dom imports and usages.
Usage
bash
Explore community-led codemods to migrate, optimize, and transform your codebase.
Build your own codemod and share it with the community.
Rename useFormState to useActionState in react-dom imports and usages
Build your own codemod and share it with the community.
1 import { useFormState as UFS, createPortal } from "react-dom";
2
3 function StatefulForm({}) {
4 const [state, formAction] = UFS(increment, 0);
5
6 createPortal();
7 return <form></form>;
8 }
9