UNPKG

redux-bus

Version:

queueing, stacking, buffering, network state validation and undoing actions redux middleware

16 lines (14 loc) 295 B
export default (state = {}, action) => { switch (action.type) { case '@@bus/UPDATE_QUEUE': { return updateQueue(state, action) } default: return state } } function updateQueue(state = {}, {payload: {queue, handler}}) { return { ...state, [handler]: queue, } }