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 new
Release note
Added
New type
FieldPathWithValueto improve generic components type support
type ExpectedType = { test: string };
const Generic = <FormValues extends FieldValues>({
name,
control,
}: {
name: FieldPathWithValue<FormValues, ExpectedType>;
control: Control<FormValues>;
}) => {
const {
field: { value, ...fieldProps },
} = useController<FormValues, ExpectedType>({
name,
control,
defaultValue: { test: 'value' },
});
return <input type="text" value={value.test} {...fieldProps} />;
};