Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: useActionState return error #6851

Closed
Marukome0743 opened this issue May 10, 2024 · 1 comment · Fixed by #6858
Closed

[Bug]: useActionState return error #6851

Marukome0743 opened this issue May 10, 2024 · 1 comment · Fixed by #6858

Comments

@Marukome0743
Copy link

Summary

When I search an issue which relevant to useActionState, I found an alike problem on form reference.

Page

https://react.dev/reference/react-dom/components/form#display-a-form-submission-error-without-javascript

Details

There is an error, (0 , _react.useActionState) is not a function or its return value is not iterable.

Screenshot Image

スクリーンショット 2024-05-10 101631

I've checked the code in sandbox, but I have no clue😭

@includerajat
Copy link
Contributor

It is because useActionState hook is not available in this 18.3.0-canary-6db7f4209-20231021 version, as used in the sandbox.

Need to update the version from 18.3.0-canary-6db7f4209-20231021 to canary this and it would fix the issue.

eg In this sandbox useActionState hook is very fine without any issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants