chantastic / reactpatterns

Patterns for React Developers
http://reactpatterns.com
1.73k stars 101 forks source link

Controlled Input is better controlled with ref= #27

Closed shamas closed 7 years ago

shamas commented 7 years ago

This is an almost universally better way to handle input. Then preset values are set with defaultValue= rather than value=

chantastic commented 7 years ago

Thanks for the feedback. Sorry it took me so long to circle back to issues on this repository.

I omitted refs simply to limit the number of concepts introduced at once. I don't think refs are "universally better" but circumstantially better.