Why would .push more likely to introduce spaghetti code?
Will deep object mutation trigger updates only in specific child component?
Yes.
A component will only re-render if the dependencies of the render function are changed. So if a child component do not depend on the "deep object mutation", then it should not be re-rendered.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why would
.push
more likely to introduce spaghetti code?Yes.
A component will only re-render if the dependencies of the render function are changed. So if a child component do not depend on the "deep object mutation", then it should not be re-rendered.