DEV Community

Discussion on: Thought on Vue 3 Composition API - `reactive()` considered harmful

Collapse
 
ycmjason profile image
YCM Jason

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.