State in React

Any web app has a state. e.g. User is logged in, User has entered data in a form, User has opened the menu. In react all this information can be stored in an object called as state. Each component can have unique state. As user interacts with the application, state of the app/component keeps changing. Based on state changes, component gets updated. In big react applications, we usually need to use useReducer hook or redux to manage the state.

Complex problems, Simple Solutions