Sign in
Log inSign up

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?