DEV Community

Dominika Zając (she/her) 🇵🇱
Dominika Zając (she/her) 🇵🇱

Posted on

How to easily detect which component is re-rendering too often (without installing additional tools)

Who has never had a problem with re-rendering components too often, cast the first stone. It happens — it’s a fact. Especially when you are a junior or just entered the frontend world. Without experience that bugs are hard to detect — everything looks fine but the browser is working hard to repaint, repaint and repaint elements on the page. Fortunately, Chrome DevTools offers a way to easily found them. You just need to follow these steps:

  1. Open Chrome browser
  2. Go to page you want to test
  3. Open Chrome Dev Tools (ctrl + shift + I on Linux/Windows or cmd + shift + I on Mac)
  4. Click 3 dots on the right side
  5. Choose Rendering
  6. Check the first checkbox titled Pain flashing there.

Thanks to that all repainted areas will be highlighted in green, so you can interact with a webpage and check if everything works are designed. Piece of cake! You don’t have to worry about having repainting problems on your webpage now.

Top comments (4)

Collapse
 
manankateshiya profile image
MananKateshiya

Thanks! This will help in my project :)

Collapse
 
domizajac profile image
Dominika Zając (she/her) 🇵🇱

Great to hear! Good luck 🤞

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
domizajac profile image
Dominika Zając (she/her) 🇵🇱

Thank you! Glad you like it