Performs a shallow equality comparison between two objects.
Two objects are considered shallowly equal if:
Nested objects are compared by reference, not by value.
isShallowEqual({ x: 1 }, { x: 1 });// → true Copy
isShallowEqual({ x: 1 }, { x: 1 });// → true
isShallowEqual( { x: { y: 1 } }, { x: { y: 1 } },);// → false Copy
isShallowEqual( { x: { y: 1 } }, { x: { y: 1 } },);// → false
Performs a shallow equality comparison between two objects.
Two objects are considered shallowly equal if:
Nested objects are compared by reference, not by value.