react-hook-form
Advanced tools
Changelog
[7.51.0] - 2024-3-2
const { formState: { validateFields } } = useForm();
Changelog
[7.49.0] - 2023-12-10
errors
prop at useForm
useForm({
errors, // Server errors
});
Changelog
[7.48.0] - 2023-11-05
disabled
prop for useForm
to disable the entire formconst App = () => {
const [disabled, setDisabled] = useState(false);
const { handleSubmit } = useForm({ disabled });
return (
<form
onSubmit={handleSubmit(async () => {
setDisabled(true);
await sleep(100);
setDisabled(false);
})}
/ >
);
}