Packages

react-hook-form

7.91.0 · 23 Oct 2026MIT42M / weekRepositoryHomepagenpmAtom feed

Your version

7.13.0

22 Aug 2021Where it was published

7.91.0 is the newest release of 7.x.

In short

5 new

Release note

Added

Trigger

  • Trigger will enable object name trigger and field array name trigger

useFieldArray({ name: 'test' });

trigger('name'); // will trigger the whole field array to validate

register

  • Added a disabled prop as an option to toggle input disable attribute

  • Register will be able to seek input DOM reference through the ref callback

register('test', { disabled: true }) // will set value to undefined and pass disabled down to the input attribute

<div {...register('test')}>
  <input name="test" /> // this input will be registered
</div>

useWatch

  • Added disabled prop to toggle the state subscription.

useWatch({ disabled: true }); // you toggle the subscription

useFormState

  • Added disabled prop to toggle the state subscription.

useFormState({ disabled: true }); // you toggle the subscription

setValue

  • Allow set value for non-registered inputs include nested object and array field.

<input {...register('test.0.firstName')} />

setValue('test', [{ firstName: 'bill' }, {firstName: 'kotaro}, {firstName: 'joris'}]) // this will works