experimental_useFormState not available
Unanswered
Oak rough bulletgall wasp posted this in #help-forum
Oak rough bulletgall waspOP
I'm trying to work with Server Actions and I have the following packages,
and I have
Has anyone else been facing this issue?
"next": "^v13.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",and I have
experimental_useFormStatus available but for some reason react-dom doesn't seem to have experimental_useFormState exported.Has anyone else been facing this issue?
8 Replies
can you try installing the
@canary version as nextjs uses it for server actions (but its bundled, so it doesn't change the version that nextjs uses) - all this should do is give better typesOak rough bulletgall waspOP
I already tried this, but still get the same issue. There's even this example provided by Next.js themselves, and on cloning that as well, I get the same issue. I'm starting to think it might be something to do with my Node maybe?
https://github.com/vercel/next.js/blob/ea148f3581ee9a8a0575b4266f740e0c34387e7f/examples/next-forms/package.json
https://github.com/vercel/next.js/blob/ea148f3581ee9a8a0575b4266f740e0c34387e7f/examples/next-forms/package.json
Oak rough bulletgall waspOP
Found a Github issue for the same as well, https://github.com/vercel/next.js/issues/55919
Well ig as long as the code works, it's fine enough
@Oak rough bulletgall wasp I'm trying to work with Server Actions and I have the following packages,
"next": "^v13.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
and I have `experimental_useFormStatus` available but for some reason `react-dom` doesn't seem to have `experimental_useFormState` exported.
Has anyone else been facing this issue?
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/66726
subscribe to this PR, and upgrade to latest version of
subscribe to this PR, and upgrade to latest version of
@types/react-dom when it's mergedAhh I forgot that it doesn't expect its own types
Oak rough bulletgall waspOP
yeah, but thanks @joulev for the PR! I'm gonna try this snippet until then, https://github.com/vercel/next.js/pull/55564#issuecomment-1731877462