import { TYPE_APP_USERINFO, TYPE_APP_FCM_TOKEN } from '../types'; const initialState = { userinfo: undefined, token: undefined }; export function appUserInfoReducer(state = initialState, action) { switch (action.type) { case TYPE_APP_USERINFO: { return Object.assign({}, state, { userinfo: action.value }); } case TYPE_APP_FCM_TOKEN: { return Object.assign({}, state, { token: action.value }); } default: return state; } }