You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of having a lot of useState to control your inputs inside a form, it would be much better to have a hook that could do this for you. What interesting is that to reduce the number of re-rendering; the hook by default makes your input uncontrolled and you need to opt-in to make it controlled.
I've already made a pull request #351 , that makes use of the above idea.
This discussion was converted from issue #352 on January 07, 2024 18:41.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Instead of having a lot of
useState
tocontrol
your inputs inside aform
, it would be much better to have a hook that could do this for you. What interesting is that to reduce the number of re-rendering; thehook
by default makes your inputuncontrolled
and you need to opt-in to make itcontrolled
.I've already made a pull request #351 , that makes use of the above idea.
Beta Was this translation helpful? Give feedback.
All reactions