Principles of State in React

State is like a special container that holds data specific to a component. This data can change over time, and whenever it does, the…