Download Latest Version Version 7.62.0 source code.tar.gz (3.2 MB)
Email in envelope

Get an email when there's a new version of React Hook Form

Home / v7.61.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-07-23 1.4 kB
Version 7.61.0 source code.tar.gz 2025-07-23 3.2 MB
Version 7.61.0 source code.zip 2025-07-23 3.4 MB
Totals: 3 Items   6.7 MB 0

🧮 feat: compute prop for useWatch subscription (#12503)

  • subscribe to the entire form but only return updated value with certain condition

    :::tsx type FormValue = { test: string; }

    const watchedValue = useWatch({ control: methods.control, compute: (data: FormValue) => { if (data.test?.length) { return data.test; }

    return '';
    

    }, });

  • subscribe to a specific form value state

    :::tsx type FormValue = { test: string; }

    const watchedValue = useWatch({ control: methods.control, name: 'test', compute: (data: string) => { return data.length > 3 ? data : ''; }, }); 👨‍🔧 trigger watch callbacks in response to value changes only (#12945) 🙏 track name with setValue subscription callbacks (#12946) ⌨️ fix: watch return type based on defaultValue (#12896) 🐞 fix [#12959] subscribe with latest defaultValues [#12961] 🐞 fix: handle explicit "multipart/form-data" encType in Form Component (#12948) 🐞 fix(build): Remove React wildcard import to resolve ESM build issues (#12942) 🦭 chore: improve exclude patterns (#12935) 🐿️ chore: remove unused omit function (#12958)

Big thanks to @joshkel for helping with some of the subscription bugs! and also @kamja44, @mrazauskas, @codepunkt, @afontcu and @rururux

Source: README.md, updated 2025-07-23