Logo Awesome React

Awesome React

Redux Tutorial #4 - Multiple Reducers with Redux Reducers

Once your store is in place, you'll want to set up multiple Redux reducers to act on parts of your data store. Redux reducers are great in that they are only aware of part of your data, and the rest of the data is neither reachable nor able to be mutated by your reducer.

GET THE CODE! https://github.com/learncodeacademy/react-js-tutorials

Reducers are a great concept in Redux, because they allow your react application to have specific pieces of data that all update synchronously. All reducers run against your Redux store, and then the store triggers a change event and your entire React.js application re-renders.

The biggest thing to keep in mind with Redux reducers is you don't want to mutate your state. ALWAYS return a new state rather than mutating the old state values.