Packages

react-hook-form

7.91.0 · 23 Oct 2026MIT42M / weekRepositoryHomepagenpmAtom feed

Your version

4.0.0

major24 Dec 2019Where it was published

4.10.2 is the newest release of 4.x.

In short

9 breaking1 new

  • breaking

    Improve module exports:

  • breaking

    Nested errors object and better typescript support

  • breaking

    triggerValidation argument change from Object, Object to String, String

  • breaking

    Watch support { nest: boolean }

  • breaking

    Improve custom register

  • breaking

    setError` support nested object

  • breaking

    handleSubmit no longer rerun array inputs contains undefined or null

  • breaking

    validationSchemaOption: hardly anyone want to use validation with abort early, or change the config.

Release note

Breaking changes

  • breaking

    Improve module exports:

import { useForm } from 'react-hook-form';
  • breaking

    Nested errors object and better typescript support

type form = {
  yourDetail: {
    firstName: string;
  };
};

errors?.yourDetail?.firstName;
  • breaking

    triggerValidation argument change from Object, Object to String, String

triggerValidation('firstName');
triggerValidation(['firstName', 'lastName']);
  • breaking

    Watch support { nest: boolean }

watch(); // { 'test.firstName': 'bill' }
watch({ nest: true }); // { test: { firstName: 'bill' } }
  • breaking

    Improve custom register

register('test', { required: true });
  • breaking

    setError` support nested object

setError('yourDetail.firstName', 'test');
errors.yourDetails.firstName;
  • breaking

    handleSubmit no longer rerun array inputs contains undefined or null

Added

  • Move RHFInput into the main repo and rename it to Controller

<Controller control={control} name="test" />

Removed

  • breaking

    validationSchemaOption: hardly anyone want to use validation with abort early, or change the config.

  • breaking

    Native validation: hardly anyone used this feature. react-hook-form.com/docs/