1const { handleSubmit } = useForm();
2const onSubmit = data => {
3 console.log(data);
4};
5
6//...
7
8<form id="hook-form" onSubmit={handleSubmit(onSubmit)}>
9 {/* your awesome form */}
10</form>
11
12<button type="submit" form="hook-form">Submit</button>