React Nugget #2: Why do I love React Hooks?

added by JavaScript Kicks
2/20/2019 8:13:44 AM

351 Views

There are lot of reasons to love React Hooks. But I have one reason that stands out from the rest. Consider a class component that sets some state. This component has a controlled input within it. class MyInput extends Component { state = { text: '' }; render() { } } With class components there are three ways to write onChange handler.


0 comments