Anurag's Blog

Anurag's Blog

Why you should use Redux and understanding it better

Why you should use Redux and understanding it better

What is Redux?

Redux is a predictable state container for JavaScript apps.

It is an open-source JavaScript library for managing and centralizing the application state, which is most commonly used with libraries such as React or Angular for building user interfaces. Similar to Facebook's Flux architecture, it was created by Dan Abramov and Andrew Clark.

What is state management in React?

State management is simply a way to engender communication and sharing of data across components. It creates a concrete data structure to represent your app's State that you can read and write.

It’s clear that state management gets messy as the app gets complex. This is why you need a state management tool like Redux that makes it easier to maintain these states.

How can Redux Help

Redux allows you to manage your app's state in a single place and keep changes in your app more predictable and traceable. It makes occurring changes in your app easier to figure out. Unfortunately, all of these benefits come with specific constraints and tradeoffs. Frequently, developers feel using Redux adds up some boilerplate code, making little things seemingly overwhelming; however, that depends solely on the app's architectural decision.

redux-2.png

Benefits of Redux

  • Storing long-term data

  • The use of "pure" reducer functions

  • Easier to test

Overall, Redux makes it easier to manage the overall state of your application and helps in creating consistent and scalable apps.

If you want to learn more about redux, I will recommend this video:

youtu.be/CVpUuw9XSjY

 
Share this