CONTACT US

Before You memo()

A young man with short dark hair, a beard, and clear-framed glasses stands in front of a metal roller shutter, looking slightly to the side with a neutral expression.
  • Verify you’re running a production build. (Development builds are intentionally slower, in extreme cases even by an order of magnitude.)
  • Verify that you didn’t put the state higher in the tree than necessary. (For example, putting input state in a centralized store might not be the best idea.)
  • Run React DevTools Profiler to see what gets re-rendered, and wrap the most expensive subtrees with memo(). (And add useMemo() where needed.)

 

Article link copied

Close button