Skip to content

v0.3.0

Compare
Choose a tag to compare
@rzane rzane released this 17 Aug 17:51
· 23 commits to master since this release

This adds a reset method to forms and adds a new hook to handle a form's onReset event.

This function can also be used to reinitialize a form's state:

const user = useFetchUser();
const form = useForm({ initialValue: { name: "" } });

useEffect(() => form.reset({ value: { name: user.name } }), [user]);