Most React developers knows the pain of refactoring a functional component only because we would like to add a state to it.
In this lesson we are going to learn a new way of handling that - React 16.7 alpha introduces a concept of hooks, which allow us to well... hook into existing React features (such as state) from inside of a functional component. By using a useState
hook we introduce state to a Counter
component without introducing a class.