News for hackers. Stuff that matters.
Re:Show HN: Build your first real world React.js application by licyeus on Wednesday September 07, 2016 @07:39PM (#12448948)
It's unfortunate that the Redux docs have led many (including myself) to think that Redux reducers means "switch statement". See http://redux.js.org/docs/basics/Reducers.html under "Note on switch and Boilerplate".

Your reducer can be whatever you want it to be as long as it does not produce side-effects. I use something like https://65535th.com/move-away/

Additionally, as roughcoder points out elsewhere in thread, using the object spread syntax (available in babel-preset-stage-2 or babel-plugin-transform-object-rest-spread) minimizes some additional boilerplate.

Re:Show HN: Build your first real world React.js application by acemarke on Wednesday September 07, 2016 @10:29PM (#12449805)
Just for the record, the Redux docs already describe this pattern: http://redux.js.org/docs/recipes/ReducingBoilerplate.html#ge...