export interface IAdvanced { test: string; obj: { prop1: string; prop2: number; }; } const INITIAL_STATE: IAdvanced = { obj: { prop1: '', prop2: 0 }, test: '' }; export function advanced(state = INITIAL_STATE, action) { switch (action.type) { case 'SET_TEST': return Object.assign({}, state, {test: action.payload}); case 'SET_NESTED': const nested = Object.assign({}, state.obj, {prop2: action.payload}); return Object.assign({}, state, {obj: nested}); default: return state; } }