-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Multiple pending form submissions #16
Comments
Html form elements accept a name attribute. I was thinking to reuse that. When the user would call An array as return value sounds nice, but then it would still be hard to match form and spinner. (what array index matches "this" form?) |
Well, I actually don't need to match specific forms at the moment. My use case is to know how many things are currently being created, and how many things are currently being deleted, and having a list of pending submissions is sufficient for that. But the idea you have is still good. Maybe the array form can just be a separate hook ¯\_(ツ)_/¯ |
|
Sure, that works 👍 |
I think one way we could support this would be to return an array from
usePendingFormSubmit
that has all of the states for the forms... that might be breaking. If that matters, we could make a new hook to return the array, then have the current one return the latest form, like it already does.On another note, with the growing complexity of this, it might be worth looking into using RxJS, or some other implementation of streams/observables to handle this a little more nicely
The text was updated successfully, but these errors were encountered: