My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How would you optimize React components with shouldComponentUpdate?

Tom Alter's photo
Tom Alter
·Sep 19, 2016

When should one use shouldComponentUpdate lifecycle hook; in all the React components I’ve written, I have never found its use? Do you ever use it?

I have read somewhere that you could write your own diff algorithm in this hook? How would you do that?