Hacker News new | ask | show | jobs
by howlinbash 2058 days ago
A good starting point to explaining reducers is that you are reducing two things into one.

A redux reducer: The action and the current state reduce into the new state. And of course it doesn't matter how many reducers or combined reducers your state uses - they're all ultimately just doing this.

This also works for Array.prototype.reduce(). You're reducing two things into one.

1 comments

The concept of a reducer isn’t the hard part of Redux... it’s designing your state, organizing actions/reducers/selectors, reducing (no pun intended...) boilerplate, dealing with side effects and asynchrony, etc.