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

[react-form] Remove useMountedRef check in useSubmit #2514

Closed
wants to merge 3 commits into from

Conversation

jokull
Copy link

@jokull jokull commented Dec 22, 2022

Description

Fixes #2500 and #2508 - maybe more things related to useSubmit

I believe the early exit inside submit is being triggered unwantingly in Next.js environments. This is a fix for that, but I'm not sure if it is then a regression for other scenarios.

@jokull jokull requested a review from a team as a code owner December 22, 2022 10:58
@BPScott
Copy link
Member

BPScott commented Jan 31, 2023

@jokull, are you able to produce a test case that fails without this change but passes with the change? I am wary of merging this change without proof that it fixes an issue and doesn't produce regressions in react 17.

@mateus
Copy link
Member

mateus commented Mar 20, 2023

@jokull just wondering if this is still something you are willing to do. If you can share a test case to reproduce this it will be great. Thanks!

@jokull
Copy link
Author

jokull commented Mar 21, 2023

Hi team! I've spent some time on this today. After upgrading to Next 13.2 none of these bugs are happening anymore. There must have been some weird compilation going on or something. I suggest upgrading to Next 13.2 for anyone running onto these bugs. Feel free to close those two mentioned.

@jokull jokull closed this Mar 21, 2023
@jokull jokull deleted the react-form-next-fixes branch March 21, 2023 10:49
@jamalsoueidan
Copy link

strict mode is breaking it!

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

Successfully merging this pull request may close these issues.

[@shopify/react-form] form.submitErrors is not populated when returning {status: "fail"}
4 participants