Skip Main Navigation
Ben IlegboduBen Ilegbodu

X reasons why your React component is slow

Saturday, December 17, 2022 ยท 0 min read

  • React is fast because of reconciliation
    • so usually optimizing isn't necessary
    • but only so much it can do
    • so if our apps are slow, it's likely cause we're making it work more than needed
  • huge components
  • passing object/array literals as props
  • anonymous function props
  • missing useEffect deps
  • object useEffect deps
  • array useEffect deps
  • storing state in DOM
  • rendering too much DOM
  • expensive useState initialize (see other post)

Keep learning my friends. ๐Ÿค“

Subscribe to the Newsletter

Get notified about new blog posts, minishops & other goodies

โ€‹
โ€‹

Hi, I'm Ben Ilegbodu. ๐Ÿ‘‹๐Ÿพ

I'm a Christian, husband, and father of 3, with 15+ years of professional experience developing user interfaces for the Web. I'm a Google Developer Expert Frontend Architect at Stitch Fix, and frontend development teacher. I love helping developers level up their frontend skills.

Discuss on Twitter // Edit on GitHub