-
-
Couldn't load subscription status.
- Fork 2.1k
Description
Describe the problem
I am using a remote function to login with enhance. The issue is enhance keeps my form values even after e redirect, meaning the values will be back when I sign out and land on the login page again.
I could fix it by using the enhance callback's form.reset() but I cannot conditionally reset based on the my remote function's result since it is not returned from submit. Also the docs wrap it in a try catch but submit never seems to throw an error even when using invalid().
Describe the proposed solution
Using enhance, I don't know if there really is a good reason to keep form values after a redirect. But, maybe I missed a better way of doing it.
Alternatives considered
No response
Importance
nice to have
Additional Information
No response