reset() function works differently starting with RHF 7.48.2 #11313
Unanswered
janvorwerk
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
reset()
function no longer works as in7.48.1
If I call it from a unconditionally from a
useEffect
dependant on theisSubmitSuccessful
as instructed in the docs, it still works.However, if I slighly change the hook design to check the value of
isSubmitSuccessful
, this used to work in7.48.1
and stopped working starting with7.48.2
.See working example using
7.48.1
(change the version to see the state no longer updated).https://codesandbox.io/p/sandbox/friendly-roman-5cn4qf
Is this per design? It seems so weirdly unexpected to me...
Thanks
Beta Was this translation helpful? Give feedback.
All reactions