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

Function FormComponent

app/src/form.tsx:4–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import React from 'react';
3
4export default function FormComponent() {
5 const methods = useForm<{
6 test: string;
7 }>({
8 defaultValues: {
9 test: '',
10 },
11 });
12
13 return (
14 <Form control={methods.control} action={'/test'}>
15 <input {...methods.register('test')} />
16 <button>Submit</button>
17 </Form>
18 );
19}

Callers

nothing calls this directly

Calls 1

useFormFunction · 0.85

Tested by

no test coverage detected