Tencent IMWeb Frontend Team
Aug 16, 2017 · Frontend Development
Why React PureComponent’s Shallow Comparison Fails on Nested Objects
This article explains the shallow comparison used by React's PureComponent, details the implementation of shallowEqual and Object.is, and shows why such a shallow check cannot correctly compare nested objects, providing code examples and clear explanations.
JavaScriptObject.isPureComponent
0 likes · 7 min read