▲ | tobyhinloopen 7 days ago | |||||||
"Look, it can render the whole app really quickly every time the user presses a key!" | ||||||||
▲ | PaulHoule 7 days ago | parent [-] | |||||||
That gets into a very interesting question of controlled vs. uncontrolled components. On one hand I like controlled components because there is a single source of truth for the data (a useState()) somewhere in the app, but you are forced to re-render for each keypress. With uncontrolled components on the other hand, there's the possible anarchy of having state in React and in the actual form. I really like this library which has a rational answer to the problems that turn up with uncontrolled forms. | ||||||||
|