[Snyk] Upgrade react-hook-form from 7.58.1 to 7.61.0#750
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the react-hook-form dependency from version 7.58.1 to 7.61.0, bringing 4 new versions worth of updates including new features, bug fixes, and performance improvements.
Key changes include:
- Addition of new
computeprop for useWatch subscription functionality - New
keepFieldsRefoption for the reset function - Various bug fixes for form data handling and subscription behavior
Files not reviewed (1)
- ui/package-lock.json: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
peterj
force-pushed
the
snyk-upgrade-ee9d1a82859ca3f9d8f51314c0dd527f
branch
from
August 15, 2025 07:03
d3eb6f0 to
5561376
Compare
Snyk has created this PR to upgrade react-hook-form from 7.58.1 to 7.61.0. See this package in npm: react-hook-form See this project in Snyk: https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc?utm_source=github&utm_medium=referral&page=upgrade-pr Signed-off-by: Peter Jausovec <[email protected]>
peterj
force-pushed
the
snyk-upgrade-ee9d1a82859ca3f9d8f51314c0dd527f
branch
from
August 15, 2025 14:59
5561376 to
2201ac8
Compare
Signed-off-by: Peter Jausovec <[email protected]>
EItanya
approved these changes
Aug 15, 2025
Raghavendiran-2002
pushed a commit
to Raghavendiran-2002/kagent
that referenced
this pull request
Apr 30, 2026
 <h3>Snyk has created this PR to upgrade react-hook-form from 7.58.1 to 7.61.0.</h3> :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project. <hr/> - The recommended version is **4 versions** ahead of your current version. - The recommended version was released **21 days ago**. <details> <summary><b>Release notes</b></summary> <br/> <details> <summary>Package name: <b>react-hook-form</b></summary> <ul> <li> <b>7.61.0</b> - <a href="https://redirect.github.com/react-hook-form/react-hook-form/releases/tag/v7.61.0">2025-07-23</a></br><p>🧮 feat: compute prop for useWatch subscription (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2761362352" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12503" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12503/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12503">#12503</a>)</p> <ul> <li>subscribe to the entire form but only return updated value with certain condition</li> </ul> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type FormValue = { test: string; } const watchedValue = useWatch({ control: methods.control, compute: (data: FormValue) => { if (data.test?.length) { return data.test; } return ''; }, });"><pre><span class="pl-k">type</span> <span class="pl-smi">FormValue</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">test</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">const</span> <span class="pl-s1">watchedValue</span> <span class="pl-c1">=</span> <span class="pl-en">useWatch</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">control</span>: <span class="pl-s1">methods</span><span class="pl-kos">.</span><span class="pl-c1">control</span><span class="pl-kos">,</span> <span class="pl-en">compute</span>: <span class="pl-kos">(</span><span class="pl-s1">data</span>: <span class="pl-smi">FormValue</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">test</span><span class="pl-kos">?.</span><span class="pl-c1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">test</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-s">''</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <ul> <li>subscribe to a specific form value state</li> </ul> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="type FormValue = { test: string; } const watchedValue = useWatch({ control: methods.control, name: 'test', compute: (data: string) => { return data.length > 3 ? data : ''; }, });"><pre><span class="pl-k">type</span> <span class="pl-smi">FormValue</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">test</span>: <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">const</span> <span class="pl-s1">watchedValue</span> <span class="pl-c1">=</span> <span class="pl-en">useWatch</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">control</span>: <span class="pl-s1">methods</span><span class="pl-kos">.</span><span class="pl-c1">control</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'test'</span><span class="pl-kos">,</span> <span class="pl-en">compute</span>: <span class="pl-kos">(</span><span class="pl-s1">data</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-c1">=></span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">data</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">></span> <span class="pl-c1">3</span> ? <span class="pl-s1">data</span> : <span class="pl-s">''</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p>👨🔧 trigger watch callbacks in response to value changes only (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3210030061" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12945" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12945/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12945">#12945</a>)<br> 🙏 track name with setValue subscription callbacks (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3210194804" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12946" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12946/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12946">#12946</a>)<br> ⌨️ fix: watch return type based on defaultValue (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3156326445" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12896" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12896/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12896">#12896</a>)<br> 🐞 fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3226443079" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12959" data-hovercard-type="issue" data-hovercard-url="/react-hook-form/react-hook-form/issues/12959/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12959">#12959</a> subscribe with latest defaultValues <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3226946310" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12961" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12961/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12961">#12961</a><br> 🐞 fix: handle explicit "multipart/form-data" encType in Form Component (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3212769870" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12948" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12948/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12948">#12948</a>)<br> 🐞 fix(build): Remove React wildcard import to resolve ESM build issues (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3206776702" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12942" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12942/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12942">#12942</a>)<br> 🦭 chore: improve exclude patterns (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3202497669" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12935" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12935/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12935">#12935</a>)<br> 🐿️ chore: remove unused omit function (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3225961191" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12958" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12958/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12958">#12958</a>)</p> <p>Big thanks to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/joshkel/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/joshkel">@ joshkel</a> for helping with some of the subscription bugs! and also <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kamja44/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/kamja44">@ kamja44</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mrazauskas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/mrazauskas">@ mrazauskas</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/codepunkt/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/codepunkt">@ codepunkt</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/afontcu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/afontcu">@ afontcu</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rururux/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/rururux">@ rururux</a></p> </li> <li> <b>7.60.0</b> - <a href="https://redirect.github.com/react-hook-form/react-hook-form/releases/tag/v7.60.0">2025-07-04</a></br><p>🦘 feat: <code>reset</code> new <code>keepFieldsRef</code> options keep fields reference (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3191330156" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12923" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12923/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12923">#12923</a>)</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// This option will skip input reference gets reset and avoid re-register input reference after reset reset(data, { keepFieldsRef: true })"><pre><span class="pl-c">// This option will skip input reference gets reset and avoid re-register input reference after reset</span> <span class="pl-en">reset</span><span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">keepFieldsRef</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> </li> <li> <b>7.60.0-next.0</b> - <a href="https://redirect.github.com/react-hook-form/react-hook-form/releases/tag/v7.60.0-next.0">2025-07-01</a></br><p>🦘 feat: <code>reset</code> new <code>keepFieldsRef</code> options keep fields reference (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3191330156" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12923" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12923/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12923">#12923</a>)</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// This option will skip input reference gets reset and avoid re-register input reference after reset reset(data, { keepFieldsRef: true })"><pre><span class="pl-c">// This option will skip input reference gets reset and avoid re-register input reference after reset</span> <span class="pl-en">reset</span><span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">keepFieldsRef</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> </li> <li> <b>7.59.0</b> - <a href="https://redirect.github.com/react-hook-form/react-hook-form/releases/tag/v7.59.0">2025-06-28</a></br><p>🪱 feat: support deep equality checking with circular references (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3176586583" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12914" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12914/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12914">#12914</a>)<br> 🐞 fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3162019046" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12900" data-hovercard-type="issue" data-hovercard-url="/react-hook-form/react-hook-form/issues/12900/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12900">#12900</a> issue with formData reference clone (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3164608853" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12906" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12906/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12906">#12906</a>)<br> 🐞 fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3124599969" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12873" data-hovercard-type="issue" data-hovercard-url="/react-hook-form/react-hook-form/issues/12873/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12873">#12873</a> issue with undefined value for submit data (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3164563082" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12905" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12905/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12905">#12905</a>)<br> 🐞 fix case when useWatch accept object variable param (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3157299182" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12897" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12897/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12897">#12897</a>)<br> 🐞 fix: typo in UseFormSubscribe and missing event type for callback data in subscribe (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3163748029" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12904" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12904/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12904">#12904</a>)<br> Revert "⌨️ rename to UseFormResetFieldOptions for type consistency" (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3165853766" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12907" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12907/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12907">#12907</a>)</p> <p>thanks to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/aspirisen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/aspirisen">@ aspirisen</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/n8pjl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/n8pjl">@ n8pjl</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/SKOLZ/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/SKOLZ">@ SKOLZ</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pushys/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/pushys">@ pushys</a> & <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/candymask0712/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://redirect.github.com/candymask0712">@ candymask0712</a></p> </li> <li> <b>7.58.1</b> - <a href="https://redirect.github.com/react-hook-form/react-hook-form/releases/tag/v7.58.1">2025-06-17</a></br><p>🔧 check window.crypto undefined (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3153410474" data-permission-text="Title is private" data-url="react-hook-form/react-hook-form#12893" data-hovercard-type="pull_request" data-hovercard-url="/react-hook-form/react-hook-form/pull/12893/hovercard" href="https://redirect.github.com/react-hook-form/react-hook-form/pull/12893">#12893</a>)</p> </li> </ul> from <a href="https://redirect.github.com/react-hook-form/react-hook-form/releases">react-hook-form GitHub release notes</a> </details> </details> --- > [!IMPORTANT] > > - Check the changes in this PR to ensure they won't cause issues with your project. > - This PR was automatically created by Snyk using the credentials of a real user. --- **Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs._ **For more information:** <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI5YmFkOWQwOS0yOWQxLTQxMzAtOGQyZS01NWQyNGJkYzIxMTkiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjliYWQ5ZDA5LTI5ZDEtNDEzMC04ZDJlLTU1ZDI0YmRjMjExOSJ9fQ==" width="0" height="0"/> > - 🧐 [View latest project report](https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 📜 [Customise PR templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates?utm_source=&utm_content=fix-pr-template) > - 🛠 [Adjust upgrade PR settings](https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) > - 🔕 [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc/settings/integration?pkg=react-hook-form&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades) [//]: # 'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"react-hook-form","from":"7.58.1","to":"7.61.0"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"9bad9d09-29d1-4130-8d2e-55d24bdc2119","prPublicId":"9bad9d09-29d1-4130-8d2e-55d24bdc2119","packageManager":"npm","priorityScoreList":[],"projectPublicId":"3a1ab099-8f8f-43a5-81e6-e07ff34c96dc","projectUrl":"https://app.snyk.io/org/kagent/project/3a1ab099-8f8f-43a5-81e6-e07ff34c96dc?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":4,"publishedDate":"2025-07-23T23:20:49.867Z"},"vulns":[]}' --------- Signed-off-by: Peter Jausovec <[email protected]> Co-authored-by: snyk-bot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade react-hook-form from 7.58.1 to 7.61.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 4 versions ahead of your current version.
The recommended version was released 21 days ago.
Release notes
Package name: react-hook-form
-
7.61.0 - 2025-07-23
- subscribe to the entire form but only return updated value with certain condition
type FormValue = {
- subscribe to a specific form value state
type FormValue = {
-
7.60.0 - 2025-07-04
-
7.60.0-next.0 - 2025-07-01
-
7.59.0 - 2025-06-28
-
7.58.1 - 2025-06-17
from react-hook-form GitHub release notes🧮 feat: compute prop for useWatch subscription (#12503)
test: string;
}
const watchedValue = useWatch({
control: methods.control,
compute: (data: FormValue) => {
if (data.test?.length) {
return data.test;
}
},
});
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
🦘 feat:
resetnewkeepFieldsRefoptions keep fields reference (#12923)🦘 feat:
resetnewkeepFieldsRefoptions keep fields reference (#12923)🪱 feat: support deep equality checking with circular references (#12914)
🐞 fix #12900 issue with formData reference clone (#12906)
🐞 fix #12873 issue with undefined value for submit data (#12905)
🐞 fix case when useWatch accept object variable param (#12897)
🐞 fix: typo in UseFormSubscribe and missing event type for callback data in subscribe (#12904)
Revert "⌨️ rename to UseFormResetFieldOptions for type consistency" (#12907)
thanks to @ aspirisen @ n8pjl @ SKOLZ @ pushys & @ candymask0712
🔧 check window.crypto undefined (#12893)
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: