Frontend & browser·JavaScript in the browser
the comparison checked each top-level property and still said unchanged, because the nested object was mutated in place.
Shallow equality
Also calledshallow compare
Comparing two objects by checking their own top-level properties with `===`, one level deep. It is what component memoisation and store selectors use, because it is cheap and predictable. It misses any change inside a nested value, which is precisely why immutable update patterns exist: they guarantee that a real change is visible at the top level.