Releases: react-hook-form/react-hook-form
Version 7.71.2
🕵️♂️ fix: use DeepPartialSkipArrayKey for WatchObserver value parameter (#13278)
🧹 fix(clearErrors): emit name signal for targeted field updates (#13280)
thanks to @veeceey, @kaigritun, @pgoslatara & @seongbiny
Version v7.71.1
Version v8.0.0-beta.1
🦭 Integrated the latest updates and fixes from Version 7
⚠️ Breaking change: pass input ref instead of partial (#12773)⚠️ Breaking change: renameuseFieldArrayidtokeykeyNameprops removed foruseFieldArray
const { fields, append } =useFieldArray()
// data will be part of the submission
append({
key: 'key', // does not affect render key
id: 'key', // does not affect render key
})
field[0].key // will still be uniq id for re-render⚠️ Breaking change: rename<Watch />renamenamestoname⚠️ Breaking change:watchcall back api removed⚠️ Breaking change:setValueno longer direct update useFieldArray, instead usereplaceapi
https://react-hook-form.com/docs/useform/setvalue
npm i [email protected]Version 7.71.0
⚡ perf: memoize FormProvider context value to prevent unnecessary rerenders (#13235)
🚄 perf: separate control context to prevent unnecessary rerenders (#13234)
🐞 fix: update isValid when field disabled state changes (#13231)
👌 chore: optimize bundle size via safe terser options (#13243) (#13244)
thanks to @kamja44, @a28689604 & @newsiberian
Version 7.70.0
✅ watch type improvement (#13228)
🐞 fix: prevent field array ghost elements with keepDirtyValues (#13188)
🐞 fix: improve invalid date handling in deepEqual and validation (#13230)
🐞 fix(types): handle branded types correctly in DeepPartial (#13222)
🐞 fix native validation focus issue (#13220)
🐞 change spread operator to set name with depricated names prop, then override with new name prop is supplied (#13214)
🐞 fix: prevent duplicate subscription trigger in setValue (#13206) (#13209)
👌 chore: fix lib type check include tests (#13229)
thanks to @EdwardEB, @constantly-dev & @a28689604
🎄 Version 7.69.0
📏 feat: align API with useWatch (#13192)
🤦🏻♂️ chore: update @deprecated names prop on (#13198)
🏥 chore: safely call function methods on elements (#13190)
🪖 chore: cve-2025-67779 (#13196)
🪖 chore: cve-2025-55184 & cve-2025-55183 (#13194)
🪖 chore: CVE-2025-55182 Critical RCE vulnerabilty (#13175)
🔬 test: add regression tests for #12837 and #13136 (#13187)
🐞 fix(reset): preserve isValid state when keepIsValid option is used (#13173)
🐞 fix: ensure each createFormControl.subscribe subscription listens only to the changes it subscribes to (#12968)
🐞 fix(validation): batch isValidating state updates with validation result (#13181)
🐞 fix(createFormControl): resolve race condition between setError and setFocus (#13138) (#13169)
🧿 fix control prop type (#13189)
🔔 chore: clean cloneObject logic (#13179)
thanks to @PierreCrb, @a28689604, @AnuragM7666, @ap0nia, @dusan233 & @hlongc
Version 8.0.0-beta.0
⬆️ Promoted v8 from alpha to beta stability
🦭 Integrated the latest updates and fixes from Version 7
npm i [email protected]Version 7.68.0
🎧 feat: <FormStateSubscribe /> component (#13142)
import { useForm, FormStateSubscribe } from 'react-hook-form';
const App = () => {
const { register, control } = useForm();
return (
<div>
<form>
<input {...register('foo')} />
<input {...register('bar')} />
</form>
{/* re-render only when formState of `foo` changes */}
<FormStateSubscribe
control={control}
name={"foo"}
render={({errors}) => <span>{errors.foo?.message}</span>}
/>
</div>
);
};🐞 fix: clear validation errors synchronously in reset() to fix Next.js 16 Server Actions issue (#13139)
Revert "✨ fix(types): allow undefined value with async defaultValues in Contr…" (#13171)
thanks to @xiangnuans, @abnud11, @ntatoud & @ap0nia
Version 7.67.0
🎯 feat: add exact to useController props (#13154)
useForm({
defaultValues: {
user: {
name: ''
}
}
})
<Controller control={control} name="user" exact={false} /> // subscribe to all user object✨ fix(types): allow undefined value with async defaultValues in Controller (#13160)
🐞 fix(types): correct PathValueImpl type inference (#13150)
thanks to @ap0nia, @Fasping & @joseph0926
Version 7.66.1
⚡ perf: reduce redundant property access in getDirtyFields (#13146)
🐞 fix(createFormControl): skip setValid() during batch array updates (#13140)
🐞 fix(useForm): recompute isValid after reset when values update asynchronously (#13126)
🐞 fix(deepEqual): handle NaN comparison correctly using Object.is (#13120)
thanks to @kimtaejin3, @a28689604 & @WuMingDao