Sajeeb Das Shuvo
1 min readJun 7, 2022

Different ways to manage a state in a React application

Plain JavaScript functions can’t store information that’s why we have to use State. The State is an object that contains certain components’ information.

Manage a state in a React application
Photo by Fernando Hernandez on Unsplash

Well, there are lots of different kinds of states and dozens of ways to manage each.

useReducer is a way to manage state which will help the application perform well.

Sometimes we face some problems when we have a lot of nested components and have to pass data in many child and siblings components here some unusual call-back occurs.

We can use useContext to avoid this prop drilling problem.

To avoid prop drilling and unpredictable behavior of state on complex state changes, we can use Redux.

Redux is a library that is being used in the React environment. There are three main building blocks in Redux.

A Store

A Reducer

An Action

Also, there are many libraries we can use to manage state.

Sajeeb Das Shuvo
Sajeeb Das Shuvo

No responses yet