Replies: 1 comment
-
did you pass |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are trying to use the code in your docs for Reset: https://react-hook-form.com/api/useform/reset
We have copied the code exactly. If we just use the regular
<input type="reset" />
then the form resets, but the problem is that the form doesn't reset to the default values, and keeps the state. So we require the other options. For those you havehave the code as follows:
<input type="button" onClick={() => reset({ firstName: "bill" }); }} />
or
2 problems:
How do we actually implement Reset, if it's not a function? How do we pass the values to it?
Beta Was this translation helpful? Give feedback.
All reactions