Elaboration on new formState.isReady
field
#12766
Unanswered
HasanMothaffar
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Beta Was this translation helpful? Give feedback.
4 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.
-
RHF's latest release (7.56.0) introduces a new field to the
formState
object calledisReady
.In the docs, it is described as
Set to true when formState subscription setup is ready.
, followed by this example:But I'm curious about the situations in which the formState subscription isn't ready, and how this affects reading/setting form values. Is there a link in the docs where I can read more about this topic?
For example, if I have the same code as above but without checking for the
isReady
field, what will the behavior be? Will the value be set successfully or will it produce an error. I sometimes use this pattern to update form values in auseEffect
after fetching data from backend or doing some calculations.(By the way, thank you for this awesome library :))
Beta Was this translation helpful? Give feedback.
All reactions