The State Hook
Hooks are functions and officially, there are 10 of them. 10 new functions that exist to make writing and sharing functionalities in your components a lot more expressive.
The first hook we’ll take a look at is called
For a long time, you couldn’t use the local state in a functional component. Not until hooks.
useState, your functional component can use and update local state.
Consider the following counter application:
Counter component shown below: