import { Form } from "https://deno.land/x/netzo@0.5.70/deps/react-hook-form.ts";
Form component to manage submission.
Examples
Example 1
Example 1
function App() {
const { control, formState: { errors } } = useForm();
return (
<Form action="/api" control={control}>
<input {...register("name")} />
<p>{errors?.root?.server && 'Server error'}</p>
<button>Submit</button>
</Form>
);
}
Type Parameters
T extends FieldValues
optional
U extends FieldValues | undefined = undefined