Hacker News new | ask | show | jobs
by iliaznk 3767 days ago
Oh, I see, Redux also requires Immutable.js to work, correct?
2 comments

Reduce requires that functions be pure (no side effects). Immutable.js is one way to enforce this but ithe is not required.

The examples mostly use things like the spread operator and Object.assign.

Nope. Redux does require that your reducers update their state immutably, but does not care HOW you do so. You can do it with Object.assign() / _.extend(), array slicing, the object spread operator, Immutable.js, the React Immutability Helpers, or one of the umpteen libs that provide abstractions for immutable updates like dot-prop-immutable or object-immutable-path.