Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn users that resetting the form while passing values will also reset defaultValues #1132

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shaundavin13
Copy link

Added documentation that warns users that when calling reset with values, the form's defaultValues updates accordingly, which means subsequent calls to reset will use the previously passed values instead of the form's original defaultValues. This helps developers who call reset with API responses to be aware that subsequent reset only revert back to that API response

…et defaultValues

Added documentation that warns users that when calling `reset` with `values`, the form's `defaultValues` updates accordingly, which means subsequent calls to `reset` will use the previously passed `values` instead of the form's original `defaultValues`. This helps developers who call `reset` with API responses to be aware that subsequent `reset` only revert back to that API response
Copy link

vercel bot commented Mar 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-hook-form-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2025 7:30am

Copy link

netlify bot commented Mar 20, 2025

Deploy Preview for sage-cassata-31d224 ready!

Name Link
🔨 Latest commit 82565ec
🔍 Latest deploy log https://app.netlify.com/sites/sage-cassata-31d224/deploys/67dbc3ef869fb40008154f71
😎 Deploy Preview https://deploy-preview-1132--sage-cassata-31d224.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant