Releases · react-hook-form/react-hook-form · GitHub
Skip to content

Releases: react-hook-form/react-hook-form

Version 7.73.1

18 Apr 07:21

Choose a tag to compare

⚡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

03 Apr 06:52
724e563

Choose a tag to compare

🐞 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

22 Mar 01:04
1fecf73

Choose a tag to compare

⚓️ 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

20 Feb 21:28
85684f9

Choose a tag to compare

🕵️‍♂️ 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

13 Jan 22:45
51589c5

Choose a tag to compare

🐞 fix #13250 issue with booleans_as_integers (#13252)

Version v8.0.0-beta.1

11 Jan 00:11
2416065

Choose a tag to compare

Version v8.0.0-beta.1 Pre-release
Pre-release

🦭 Integrated the latest updates and fixes from Version 7

  • ⚠️ Breaking change: pass input ref instead of partial (#12773)
  • ⚠️ Breaking change: rename useFieldArray
    • id to key
    • keyName props removed for useFieldArray
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 /> rename names to name
  • ⚠️ Breaking change: watch call back api removed
  • ⚠️ Breaking change: setValue no longer direct update useFieldArray, instead use replace api
    https://react-hook-form.com/docs/useform/setvalue
npm i react-hook-form@8.0.0-beta.1

Version 7.71.0

11 Jan 00:15
195139d

Choose a tag to compare

⚡ 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

04 Jan 03:24

Choose a tag to compare

✅ 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

20 Dec 02:27

Choose a tag to compare

📏 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

07 Dec 00:32
46f48e8

Choose a tag to compare

Version 8.0.0-beta.0 Pre-release
Pre-release

⬆️ 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