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

Code split onSubmit async behaviour to a separate asyncSubmit function #235

Closed
dxinteractive opened this issue Jul 23, 2019 · 1 comment
Closed

Comments

@dxinteractive
Copy link
Collaborator

Instead of

// saveData returns a promise

useParcelForm({
    onSubmit: parcel => saveData(parcel.value)
});

do

useParcelForm({
    onSubmit: asyncSubmit(parcel => saveData(parcel.value))
});
@dxinteractive
Copy link
Collaborator Author

Released in v1.0.0

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

No branches or pull requests

1 participant