The state is a built-in React object that is used to contain data or information about the component. A component's state can change over time; whenever it changes, the component re-renders
- Whenver we use a varibale in react our component is not updated (freeze).To track updates on component we use state.
- State is like a data container which holds any value.
Site preview :- Click here to preview