UseFormState import in client component
Unanswered
New Guinea Freshwater Crocodile posted this in #help-forum
New Guinea Freshwater CrocodileOP
Anyone know why I get this?
Project refuses to compile
"react": "^18.2.0",
"react-dom": "^18.2.0",
"next": "13.5.5",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
TypeError: (0 , react_dom__WEBPACK_IMPORTED_MODULE_6__.useFormState) is not a function or its return value is not iterableProject refuses to compile
"react": "^18.2.0",
"react-dom": "^18.2.0",
"next": "13.5.5",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
2 Replies
New Guinea Freshwater CrocodileOP
Even useFormStatus is broken:
"use client";
import { useFormStatus } from "react-dom";
import { Button } from "../ui/button";
export function SubmitButton() {
const { pending } = useFormStatus();
return (
<Button type="submit" aria-disabled={pending}>
Submit
</Button>
);
}Barbary Lion
Works for me