Example from immutably updating a person object in a Redux reducer.
return { ...state, // spread the state person: { ...state.person, // spread the person [action.personAttribute]: action.newAttributeValue // overwrite the value } }