Form
Form component to manage submission.
@example
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>
);
}
function Form<T extends FieldValues, U extends FieldValues | undefined = undefined>(props: FormProps<T, U>): React.JSX.Element;
§
Form<T extends FieldValues, U extends FieldValues | undefined = undefined>(props: FormProps<T, U>): React.JSX.Element
[src]