Skip to content

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

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

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

Version 7.68.0

03 Dec 22:07

Choose a tag to compare

🎧 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

28 Nov 20:50

Choose a tag to compare

🎯 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

17 Nov 20:19

Choose a tag to compare

⚡ 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