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
Hello
i have this client component and im using useActionState along with react hook form to make validation on both client and server side , my main problem is when i submit the form with registered email for example , instead of getting this response directly on the console , im getting the initialstate that im passing in useActionState fn (null in my code) ,then when i submit the form second or several times after the first time i will get desired response . so how can i solve the problem and return directly that error ?
notice : im trying actually to dont use useEffect hook..
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
-
Summary
Hello
i have this client component and im using useActionState along with react hook form to make validation on both client and server side , my main problem is when i submit the form with registered email for example , instead of getting this response directly on the console , im getting the initialstate that im passing in useActionState fn (null in my code) ,then when i submit the form second or several times after the first time i will get desired response . so how can i solve the problem and return directly that error ?
notice : im trying actually to dont use useEffect hook..
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions