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

Function onSubmit

examples/V7/basicValidation.tsx:9–11  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

7export default function Form() {
8 const { register, errors, handleSubmit } = useForm();
9 const onSubmit = (data) => {
10 alert(JSON.stringify(data));
11 };
12 console.log(errors);
13
14 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected