Field State updates not working without console.log #12587
Unanswered
whatever010101
asked this question in
General
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.
-
I'm using React Hook Form (v7) with a custom
useFormField
hook that usesgetFieldState
. I've noticed that real-time field state updates (like validation states) only work when I include aconsole.info
statement in the hook. Without it, the component doesn't return the correct value for the field states.Code that doesn't work
Why does field state updating depend on console.info, and what's the proper way to handle this? Is this a known issue with React Hook Form's subscription system? I'm really confused. I can't wrap my head around this.
Beta Was this translation helpful? Give feedback.
All reactions