MCPcopy Create free account
hub / github.com/react-hook-form/react-hook-form / onSubmit

Function onSubmit

examples/V6/FieldArray.tsx:12–14  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

10 const { register, handleSubmit, errors } = useForm();
11 const [size, setSize] = useState(1);
12 const onSubmit = (data) => {
13 alert(JSON.stringify(data));
14 };
15
16 console.log(errors);
17

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected