Skip to content

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

Version 7.45.3

04 Aug 22:22
Compare
Choose a tag to compare

📼 add Replay Test Suites (#10681)
Revert "🧑‍🎓 close #10585 update controller value on each render (#10586)"
🐞 close #10682 make sure action flag gets reset after useEffect (#10732)

thanks to @jasonLaster

Version 7.45.2

17 Jul 13:42
Compare
Choose a tag to compare

🧾 fix(types): async defaultValues await promise value (#10637)
🥲 revert strict type check on Controller onChange (#10609)
📖 docs(changelog 7.45.0): typo and format (#10624)
📖 fix:test-spelling-error (#10629)

thanks to @anton-g, @milhamm, @moshfeu & @OlliePrentice

Version 7.45.1

28 Jun 11:05
Compare
Choose a tag to compare

🐞 fix #10602 issue with reactive values props update (#10606)
🧑‍🎓 close #10585 update controller value on each render (#10586)
🧪 test(generated-id): setting window performance undefined without ts-ignore (#10584)

thanks to @mateoguzmana

Version 7.45.0

19 Jun 11:17
Compare
Choose a tag to compare

🐞 close #10523 equal values prop not reset form values (#10525)
🪲 fix: useFormContext ReturnType (#10543)
⌨️ fix <Form /> onSubmit type overwrite (#10520)
👮‍♀️ enforce stricter type for controller on change callback (#10342)
🪲 fix: invalid test case for useController (#10493)
🎮 build: use up-to-date terser plugin (#10488)
💫 upgrade api-extractor version (#10487)

thanks to @kotarella1110, @Moshyfawn, @swallowtail62 and @bajormar

Version 7.45.0-next.1

18 Jun 22:13
Compare
Choose a tag to compare
Version 7.45.0-next.1 Pre-release
Pre-release

🪲 fix: useFormContext ReturnType (#10543)

thanks to @swallowtail62

Version 7.45.0-next.0

11 Jun 11:10
Compare
Choose a tag to compare
Version 7.45.0-next.0 Pre-release
Pre-release

🐞 close #10523 equal values prop not reset form values (#10525)
⌨️ fix <Form /> onSubmit type overwrite (#10520)
👮‍♀️ enforce stricter type for controller on change callback (#10342)
🪲 fix: invalid test case for useController (#10493)
🎮 build: use up-to-date terser plugin (#10488)
💫 upgrade api-extractor version (#10487)

thanks to @kotarella1110, @Moshyfawn and @bajormar

Version 7.44.3

01 Jun 22:59
Compare
Choose a tag to compare

🦉 fix: add named component export (#10486)
💭 fix React import inconsistency (#10479)
🏙️ fix: removed code from the README updater which was trying to read a non-existent docs/Helpers.yaml
📝 fix doc: update urls from /api to /docs (#10468)

thanks to @Moshyfawn @@protofarer @farfromrest

Version 7.44.2

28 May 23:04
Compare
Choose a tag to compare

🪟 fix #10456 object.hasown replaced with hasOwnProperty (#10458)

Version 7.44.1

27 May 06:54
Compare
Choose a tag to compare

🐞 fix <Form /> component content-type json type missing (#10454)

Version 7.44.0

27 May 01:19
Compare
Choose a tag to compare

📄 New <Form /> Component (#9735)

https://react-hook-form.com/docs/useform/form

  • add try and catch for JSON.stringify
// Send post request with formData
<Form
  action="/api"
  control={control}
  onSuccess={() => {
    alert("Great");
  }}
/>

// Send post request with json form data
<Form action="/api" encType="application/json" headers={{ accessToken: 'test' }}> 
  {errors.root?.server.type === 500 && 'Error message'}
  {errors.root?.server.type === 400 && 'Error message'}
</Form>

// Send post request with formData with fetch
<Form
  onSubmit={async ({ formData, data, formDataJson, event }) => {
    await fetch("api", {
      method: "post",
      body: formData,
    });
  }}
/>

🗝️ support TransformedValues with useFormContext (#10322)

useFormContext<FormValue, TransformedValues>()

🚔 added TTransformedValues to FormProvider (#10368)

FormProviderProps<TFieldValues, TContext, TTransformedValues>

🐞 fix #10139 with errors diff from the previous with field array action (#10216)
🐞 related #10238 return default values in watch and useWatch when reset is called with an empty object
🦮 remove unnecessary as unknown as cast (#10300)
🧛‍♂️ close #10277 remove pattern empty string check (#10279)
🐞 fix #9037 bugs that occur in the presence of Array polyfills (#10328)
🫥 close #10348 stop shouldUseNativeValidation pass down constraint props (#10350)
😵‍💫 close #10386 re-register controller input to fix strict mode (#10418)
✍️ update form.tsx for TSdoc (#10399)

thanks to @yasamoka & @Torvin @ryota-murakami & @devakrishna33