import { combineReducers } from 'redux' const liveInitialState = { loading: false, error: null, opt: {}, } const liveReducer = (state = liveInitialState, action) => { let results; switch(action.type) { case 'LIVE_LOAD_OPT_FROM_SERVER': return { ...state, loading: false, error: null, opt: action.opt, } case 'LIVE_SET_OPT': return { ...state, opt: { ...state.opt, [action.key]: action.value, } } default: return state } } export default liveReducer