import { Constants , IDemoState , DemoActions } from './types' ; const init = { list : [ ] } ; export function demoReducer ( state = init , action ) { switch ( action . type ) { case Constants . ADD_ITEM : return { list : [ ... state . list , action . payload . item ] } ; default : return state ; } }