github.com/stampzilla/stampzilla-go@v2.0.0-rc9+incompatible/nodes/stampzilla-server/web/src/ducks/server.js (about) 1 import { Map } from 'immutable'; 2 import { defineAction } from 'redux-define'; 3 4 const c = defineAction( 5 'server', 6 ['UPDATE'], 7 ); 8 9 const defaultState = Map({ 10 }); 11 12 export const update = state => ( 13 { type: c.UPDATE, state } 14 ); 15 16 export default function reducer(state = defaultState, action) { 17 switch (action.type) { 18 case c.UPDATE: { 19 return state 20 .mergeDeep(action.state); 21 } 22 default: { 23 return state; 24 } 25 } 26 }