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