Introduction

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.

What is Redux?

Redux is a predictable state container for JavaScript 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.

Why Redux?

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.

What are we going to build?

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

React Redux Deep Dive: State Management in React with Redux
2.05 GEEK