You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I just followed a youtube tutorial about using server action with useFormState. When I following the video, There is an error fro react saying to use useActionState insted of useFormState. So I followed it up. Here is my current implementation
Uncaught Error: A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you're trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().
I've tried to change using requestSubmit() but the form not submitted although the error is gone. Can someone help me pointed out the problem? thanks
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all, I just followed a youtube tutorial about using server action with
useFormState
. When I following the video, There is an error fro react saying to useuseActionState
insted ofuseFormState
. So I followed it up. Here is my current implementationWhenever I tried to submit, I will got error
I've tried to change using
requestSubmit()
but the form not submitted although the error is gone. Can someone help me pointed out the problem? thanksBeta Was this translation helpful? Give feedback.
All reactions