News for hackers. Stuff that matters.
Re:Step by Step Guide to Building React Redux Apps by honua on Saturday February 27, 2016 @10:21PM (#11189673)
Not counting other parts of its API like combineReducers and subscribing listeners, Redux is essentially..

function createStore(reducer, initialState) { let state = initialState; return { dispatch(action) { state = reducer(state, action); }, getState() { return state; } } }

It's quite simple.. and yes, it should only be used when needed, but the whole implementation of the Redux part of an app can exist in a few lines in a single file.

Re:Step by Step Guide to Building React Redux Apps by honua on Sunday February 28, 2016 @03:45AM (#11190359)
Sorry, the formatting for that didn't come out right
Re:Step by Step Guide to Building React Redux Apps by bjz_ on Sunday February 28, 2016 @04:54AM (#11190520)
You need four-spaced indents to create code blocks.