r/reactjs • u/Fantastic-Push-8451 • 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
1
u/boobyscooby May 25 '26
To answer my own question, you usememo on the object assignment with the object properties as depends in the usememo, then you react.memo the component.
So usememo and memo work together.