Skip to content
Discussion options

You must be logged in to vote

For dependent value fields you should use controlled inputs as you're literally control an input value with another input.

With uncontrolled input, you don't get re-renders as the source of truth for the form field's value is the actual input. And you want the field values to be reactive.

As you've mentioned that your value is been updated only on un-focus (blur), it means that there's some form logic that makes the form re-render onBlur or something along these lines (it's hard to tell without a repro example). So, at the of the day, it's the controlled vs uncontrolled input approach where you deviated a bit from the "right" solution

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bluebill1049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants