Any problems using <Controller /> without setting value of input inside render? #12591
Unanswered
horita-yuya
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.
-
Controller is "Wrapper component for controlled inputs".
According to doc, "value" is used to set up input initial and updated value.
But I came up with an idea Controller can be used as Uncontrolled input, I'm not sure it is useful, just my curiosity.
For example, the below code doesn't pass value, instead defaultValue is set.
This code behaves like
This looks like uncontrolled input.
I'm not sure if this is useful, but I want to know if there are some critical problems.
(ref is not passed. So there are some focusing problems but I think it is not critical)
Beta Was this translation helpful? Give feedback.
All reactions