You’re right, shallowing copying won’t create a new reference for nested objects. The top-level reference will change though.
state === newState // false
The problem with your example is it doesn’t achieve isolation between
newState, which is why Redux reducers can be error-prone without a library like ImmutableJS. I can mutate
newState and it will mutate
state as well and vice versa.
I will edit the wording to reflect your clarification. Thanks.