react-hook-form
Advanced tools
Changelog
[7.41.0] - 2022-12-17
useForm
added values
propsconst values = await fetch('API');
useForm({
values, // will reset the form when values updates
// resetOptions: {
// keepDirtyValues: true
// }
});
isLoading
formState for async defaultValues
const {
formState: { isLoading },
} = useForm();
useForm
support async defaultValues
propsconst {
formState: { isLoading },
} = useForm({
defaultValues: fetch('API'),
// resetOptions: {
// keepDirtyValues: true
// }
});
Changelog
[7.40.0] - 2022-11-30