Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1x 6x 8x 6x 10x 10x 6x 6x | const serverState = ({ initialState, reducer, createActions }) => { let state = initialState const getState = () => Object.assign({}, state, actions) const dispatch = (type, params) => { state = reducer(state, Object.assign({ type }, params)) return Promise.resolve(this) } const actions = createActions({ getState, dispatch }) return { getState, dispatch, actions } } export default serverState |