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
The form action returned from the hook useFormState becomes null when using React strict mode. It causes the page to reload on the submission of the form and the action does not work. I know that the React strict mode performs some actions twice intentionally to find unexpected behavior in the development. But, it would be better if we could use it without disabling the Strict mode.
18.3.0-canary-bb0944fe5-20240313: bad
18.3.0-canary-b36ae8d7a-20231207: good
18.3.0-canary-971b62f47-20240129: good
18.3.0-canary-2e470a788-20240214: good
18.3.0-canary-01ab35a9a-20240228: good
18.3.0-canary-0066e0b68-20240306: good
18.3.0-canary-eb33bd747-20240312: good
Last good: 18.3.0-canary-eb33bd747-20240312
First bad: 18.3.0-canary-bb0944fe5-20240313
The form action returned from the hook
useFormState
becomes null when using React strict mode. It causes the page to reload on the submission of the form and the action does not work. I know that the React strict mode performs some actions twice intentionally to find unexpected behavior in the development. But, it would be better if we could use it without disabling the Strict mode.React version: 0.0.0-experimental-bb0944fe5-20240313
Steps To Reproduce
Link to code example:
https://codesandbox.io/p/sandbox/jolly-minsky-kmkspd
https://codesandbox.io/p/sandbox/damp-tree-yv2vzy
The current behavior
Form action becomes null causing the page to reload.
The expected behavior
Form action should be a function provided as the argument in the
useFormState
hook.The text was updated successfully, but these errors were encountered: