Wrapping useForm for a "global" handleSubmit of sorts #4158
Unanswered
jasonlewis
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wanting to implement a way to easily handle some shared logic between a lot of forms (mainly handling potential server errors/validation) with less overhead and boilerplate in each form.
What I've been playing with is essentially providing a
useForm
wrapper in userland that more or less looks like this (removed some things for brevity):I guess my concern here is that this isn't a good way to go about it so I'm just after any insight as to whether this approach could have any drawbacks. Any other suggestions on how to achieve this sort of error handling?
Beta Was this translation helpful? Give feedback.
All reactions