DEV Community

Discussion on: How the React updates DOM?

Collapse
ppezaris profile image
ppezaris

As your app gets larger, you really do need to pay attention to componentShouldUpdate and React.memo -- otherwise even the virtual dom render step will make your app feel sluggish. I wish there were more online guides about this.

Collapse
sandydamy profile image
Sandesh Damkondwar • Edited on

Agree, we will end up in hitting the render method unnecessarily and read DOM & virtual DOM and check diff and decide it will be rendered or not. If the DOM is huge and have lot of nested props usage, one unused prop change might end up in doing lot of unnecessary complex tasks if componentShouldUpdate is not handled correctly.