NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #750 most downloaded on npm
Performant, flexible and extensible forms library for React Hooks
Last release 9 days ago
26 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
1100 releases · first in 2019
clearError have second option argument for clear errors which are exact or key name
clearError have second option argument for clear errors which are exact or key nameregister('test.firstName', { required: true });
register('test.lastName', { required: true });
clearErrors('test', { exact: false }); // will clear both errors from test.firstName and test.lastName
clearErrors('test.firstName'); // for clear single input error
all types from this lib has been exported. Important: only documented type: https://react-hook-form.com/ts will avoid breaking change.
One column per quarter.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
errors is also part of formState object
errors is also part of formState objectdisabled input will not be part of the submission data by following the HTML standardNothing published for this version
Nothing published for this version
Controller's render prop will pass down name prop
Controller's render prop will pass down name prophandleSubmit take a second callback for errors callbackonTouched will only trigger validation after inputs are touchedregister no longer compare ref difference with React NativeNothing published for this version
IE 11 version will be required to install @babel/runtime-corejs3 as dependency at your own project
@babel/runtime-corejs3 as dependency at your own projectNothing published for this version
defaultValue is become required for useFieldArray at each input
defaultValue is become required for useFieldArray at each inputNothing published for this version
revert getValues will return default values before inputs registration
getValues will return default values before inputs registrationNothing published for this version
Nothing published for this version
resolver supports both async and sync
resolver supports both async and syncgetValues will return default values before inputs registrationNothing published for this version
error message will support array of messages for specific type
ArrayField type- export type ValidateResult = Message | boolean | undefined;
+ export type ValidateResult = Message | Message[] | boolean | undefined;
Nothing published for this version
Nothing published for this version
Nothing published for this version
Controller onFocus works with React Native
onFocus works with React Nativechecked prop by boolean valueexport UseFormOptions, UseFieldArrayOptions, FieldError, Field and Mode type
UseFormOptions, UseFieldArrayOptions, FieldError, Field and Mode type### Added - export ValidationRules type
ValidationRules typeconfig for shouldUnregister which allow input to be persist even after unmount
shouldUnregister which allow input to be persist even after unmountuseForm({
shouldUnregister: false, // unmount input state will be remained
});
append({}, (autoFocus = true));
prepend({}, (autoFocus = true));
insert({}, (autoFocus = true));
import { useForm, NestedValue } from 'react-hook-form';
type FormValues = {
key1: string;
key2: number;
key3: NestedValue<{
key1: string;
key2: number;
}>;
key4: NestedValue<string[]>;
};
const { errors } = useForm<FormValues>();
errors?.key1?.message; // no type error
errors?.key2?.message; // no type error
errors?.key3?.message; // no type error
errors?.key4?.message; // no type error
useWatch (new) subscribe to registered inputs.<input name="test" ref={register} />;
function IsolateReRender() {
const { state } = useWatch({
name: 'test',
control,
defaultValue: 'default',
});
return <div>{state}</div>;
}
getValues() support array of field namesgetValues(['test', 'test1']); // { test: 'test', test1: 'test1' }
useForm({ mode: 'all' }) support all validationrename validationResolver to resolver
rename validationContext to context
rename validateCriteriaMode to criteriaMode
rename triggerValidation to trigger
rename clearError to clearErrors
rename FormContext to FormProvider
rename dirty to isDirty
dirtyFields change type from Set to Object
Controller with render props API, and removed the following props:
-<Controller
- as={CustomInput}
- valueName="textValue"
- onChangeName="onTextChange"
- control={control}
- name="test"
-/>
+<Controller
+ render={({ onChange, onBlur, value }) => (
+ <CustomInput onTextChange={onChange} onBlur={onBlur} textValue={value} />
+ )}
+ control={control}
+ name="test"
+/>
setError will focus one error at a time and remove confusing set multiple errors, behavior change.
- setError('test', 'test', 'test')
+ setError('test', { type: 'test', message: 'bill'})
setValue will focus on input at a timesetValue('test', 'value', { shouldValidate: false, shouldDirty: false })
validationSchema and embrace validation resolvernest option for watch & getValues, so data return from both methods will be in FormValues shape.-getValues({ nest: true }); // { test: { data: 'test' }}
-watch({ nest: true }); // { test: { data: 'test' }}
+getValues(); // { test: { data: 'test' }}
+watch(); // { test: { data: 'test' }}
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →