()
| 2 | import React from 'react'; |
| 3 | |
| 4 | export 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 | } |