What is a state? How to use state?
The state is a vital part of React apps, making user interfaces interactive. Represents data that changes over time.
We declare an initial state in the component's constructor. As first line call the super function. (To communicate with other components). In order to create the initial state for a component, we must declare the property this.state as an object in the class constructor function.
We update state by calling this.setState(), this causes our component to re-render.