svelte-forms-lib
svelte-forms-lib copied to clipboard
Have form.reset()
I don't know if it already exists and I'm not aware of it but I think we should have a reset method on form and use that to reset form after validations have succeeded and form submitted correctly.
@shellking4 createForm exposes a Svelte writable store named form. You can manually update the state by doing .set(INITIAL_STATE).
E.g.,
const initFormState = {
email: '',
password: '',
}
form.set(initFormState) // reset fields
I think we have something like handleReset function