Packages

react-hook-form

7.91.0 · 23 Oct 2026MIT42M / weekRepositoryHomepagenpmAtom feed

Your version

7.41.0

16 Dec 2022Where it was published

7.91.0 is the newest release of 7.x.

In short

2 new1 changed

Release note

Added

  • useForm added values props

const values = await fetch('API');

useForm({
  values, // will reset the form when values updates
  // resetOptions: {
  //   keepDirtyValues: true
  // }
});
  • New isLoading formState for async defaultValues

const {
  formState: { isLoading },
} = useForm();

Changed

  • useForm support async defaultValues props

const {
  formState: { isLoading },
} = useForm({
  defaultValues: fetch('API'),
  // resetOptions: {
  //   keepDirtyValues: true
  // }
});