In the world of React, efficient State Management is one of the most important things a developer has to perform in order to produce a solid website and Redux is one of the best ways of achieving this.
In this article we are going to see how you could get started with Redux and use it to easily manage state in your React apps.
Redux is used for managing and updating state in an immutable way.
This means that when changes are done to the state, the existing state isn’t updated to a new value, instead a new reference of the existing data is created, changes are made and the old state is replaced with this.
Redux helps to create a single source of truth. Redux allows you to maintain all your data in one place, making life easier. All your data storage and manipulation happens in one place.So enough of introductions… Its time to get our hands dirty.
We are going to build a simple app where we can manage two entities, Posts and Todos. You can take a look at the finished website here. We will be
Loading Posts and Todos from the JSON PlaceHolder API
Adding a Post or Todo
Deleting a Post or Todo
#react #react-redux #redux