How Does Shallow Comparison Work In React?

And some interesting takeaways that you didn’t know about.

Chak Shun Yu
Better Programming
Published in
4 min readApr 3, 2022

--

Shallow comparison as a concept is all over React development. It plays a key role in different processes and can also be found at several places in the lifecycle of React components. Think of the mechanism to determine whether class components should update, the dependencies array of React…

--

--

Lifelong learner working as a frontend engineer. React. Self Development and Reflection. Testing. Technical Blogging.