Hooks are from a recent release in React, and allow new features for functional components, including the ability to store state values.
To go along with this, lifecycle method functionality is also available through hooks.
Today we will cover two main hooks:
useState( ) — for storing state values in functional components
useEffect( ) — for lifecycle method functionality within functional components
useState
The useState( ) hook allows for storing state values within functional components, and enables us to change those values in a way similar to this.setState( )