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
1 changed
Release note
Changed
useFormwillregistermissing inputs fromdefaultValues
const App = () => {
const { register, handleSubmit } = useForm({
defaultValues: {
test: { firstName: 'bill', lastName: 'luo' },
},
});
const onSubmit = (data) => {
// missing registered input will be included
console.log(data); // { test: { firstName: 'bill', lastName: 'luo' } }
};
return (
<form onSubmit={handleSubmit(onSubmit)}>
<input {...register('test.firstName')} />
<button />
</form>
);
};