Introduction
Manipulating objects in Redux might seem a little bit overwhelming at first but in time it becomes very clear and easy to understand. You just need to remember a few things and you can’t forget the crucial rule – don’t mutate the state directly.
The goal of this article is to demonstrate how to manipulate nested objects and arrays in Redux so I won’t focus on things like setting the React project and making Redux configuration. I will not focus on redux actions as well. For the purpose of this article, I created a simple project on Github – a page with posts, comments and likes.
https://github.com/wojciechnowaczyk/reduxApp
What you need to know:
- JS basics
- React basics
- Redux basics
Let’s go! (więcej…)