Next.js Discord

Discord Forum

Can't import useFormStatus

Unanswered
フェイン (Fane) posted this in #help-forum
Open in Discord
I get this error when I try to use the function:

TypeError: (0 , react_domWEBPACK_IMPORTED_MODULE_2.experimental_useFormStatus) is not a function

I have tried installing the experimental branch of react and react-dom, and also the types packages, but I always get the same result. There is no errors in my editor, but also no autocomplete.

Here are my dependencies:
  "dependencies": {
    "@types/react": "^18.2.45",
    "@types/react-dom": "^18.2.17",
    "next": "14.0.4",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },


I reverted to latest version of react after it failed

5 Replies

npm install @types/react-dom@latest
then
import { useFormStatus } from 'react-dom'
ah, does that mean it is not experimental anymore?
yes not experimental in nextjs
thanks!