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?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct