Unform

Accessing form event

Accessing form event

On the web, you can access the form event in the 3rd parameter of the submit function.

1export default function MyForm() {
2 function handleSubmit(data, { reset }, event) {
3 console.log(event)
4 }
5
6 return <Form onSubmit={handleSubmit}>...</Form>
7}
Edit this page on GitHub