Object.assign({}, oldObj, {changeProp: newValue})
return {
...oldObj,
changeProp: newValue
};
Object.assign({}, oldObj, {changeProp: newValue})
return {
...oldObj,
changeProp: newValue
};