Releases: react-hook-form/react-hook-form
Version 7.73.1
⚡perf: memoize submit (#13378)
🚉 perf: improve deepEqual performance (#13362)
👀 perf: skip re-render in setValue when value is unchanged (#13352)
✂️ remove unneeded flag check for shouldDirty
🚨 fix: safely access field._f during register (#13365)
🧹 close #13298: improve fieldState errors when resolver uses dot-notation string keys (#13350)
🐞 fix #13178: update state correctly in watch callback with Controller, trigger, and reset (#13180)
🐞 fix #13331: skip field array validation when mode is onBlur (#13333)
🐞 fix #13334 sDirty remains false after deletion an item with shouldDirty: true (#13357)
🐞 fix: handle nested field when parent defaultValue is null (#13348)
thanks to @Prasadzoman, @cyphercodes, @lorenzoceglia, @rizwan-rizu, @tomeelog & @ap0nia
Version 7.72.1
🐞 fix: add isDirty check for numeric string keys in defaultValues (issue #13346) (#13347)
🐞 fix: prevent setValue with shouldDirty from polluting unrelated dirty fields (#13326)
🐞 fix: memoize control in HookFormControlContext to prevent render conflicts (#13272) (#13312)
🐞 fix: isNameInFieldArray should check all ancestor paths for nested field arrays (#13318)
🐞 fix: #13320 formState.isValid incorrect on Controller re-mount (#13324)
thanks to @6810779s, @candymask0712, @olagokemills, @shahmir-oscilar & @bae080311
Version 7.72.0
⚓️ feat: built-in form level validate (#13195)
useForm({
validate: async ({ formValues }: FormValidateResult) => {
if (formValues.test1.length > formValues.test.length) {
return {
type: 'formError',
message: 'something is wrong here',
};
}
if (formValues.test === 'test') {
return 'direct error message';
}
return true;
},
});🐞 fix: prevent useFieldArray from marking unrelated fields as dirty (#13299)
🐞 fix #13300 checkbox form validation ignored with native validation (#13310)
🌉 allow subscribe formState to track submit state (#13319)
thanks to @WiXSL, @BrendanC23 & @6810779s
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 react-hook-form@8.0.0-beta.1Version 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 react-hook-form@8.0.0-beta.0