We can use state in functional components!

With the implementation of hooks, React allows us to use state without a class. We can use state in a functional component with the useState hook instead of using class components every time we need to use state.

What is a Hook?

According to the React docs a hook is a special function that…

--

--