react-hook-form
7.91.0 · 23 Oct 2026MIT42M / weekRepositoryHomepagenpmAtom feed
Your version
7.91.0 is the newest release of 7.x.
In short
2 new
Release note
Added
useFieldArraynew methodreplace()
const { control } = useForm({
defaultValues: {
test: [{ value: 'lorem' }, { value: 'ipsum' }],
},
});
const { fields, replace } = useFieldArray({
control,
name: 'test',
});
const handleFullyReplacement = (): void => {
// remove old and set fully new values
replace([{ value: 'dolor' }, { value: 'sit' }, { value: 'amet' }]);
};Improved to not map types defined with
interface.
import { useForm } from 'react-hook-form';
interface CustomValue {
custom: string;
}
type FormValues = {
fieldName: CustomValue;
};
const { formState: errors } = useForm<FormValues>({
defaultValues: { fieldName: { custom: 'value' } },
});