Search⌘ K
AI Features

Returning the State from the Reducer

Explore how to correctly return state from Redux reducers by creating new state objects instead of mutating existing ones. Understand why reducers must be pure functions without side effects and how to use the ES6 spread operator to update state safely.

We'll cover the following...

When returning state from reducers, there’s something that may put you off at first.

However, if you already write good ReactJS code , then you should be familiar with this already:

You should not mutate the state received in your ...