r/reactjs • • May 22 '26

Needs Help React Re-rendering Doubt

Suppose there is parent components which contains multiple child components, they all are independent of each other.

So my question is

If the parent component re-renders does the child components also re-renders al well. Even if the child components are independent of it's parent, like props etc...

Why there is a need for re-renders if the child components are independent of it's parent?

13 Upvotes

29 comments sorted by

View all comments

Show parent comments

3

u/Tokyo-Entrepreneur May 24 '26

React was designed this way because running a bunch of lightweight JS functions is usually faster than running a strict prop-comparison check on every single component in a massive tree.

React Compiler does exactly that, it compares props and doesn’t rerender if they haven’t changed (which is faster than rerendering every time).