DEV Community

Discussion on: React components composition: how to get it right

Collapse
 
lgibso34 profile image
Logan Gibson • Edited

My mind is blown. I did not know that passing the children prop prevented the children from re-rendering if the parent re-renders. I referred back to your article

How to write performant React code

and one of the ways React can re-render is

when a parent component re-renders

So my mind is absolutely blown that the children prop slightly invalidates the sentence above.

This stack overflow answer helped me understand why

I absolutely love your articles. They are so in depth and your topics are exactly what I want to read about. Thank you for taking the time to write these!

Collapse
 
adevnadia profile image
Nadia Makarevich

Thank you for such nice feedback πŸ₯°
Gives me motivation to write more ☺️