How does the props of vue prevent child components from contaminating the value of the parent component?

the official website says to use computed? But what about passing values from objects to arrays?

Mar.04,2021

objects and arrays can be written in computed with deep copy. For specific objects, you can use JSON.parse (JSON.stringfy (obj)) ), the array can use arr.slice (0) , and the deep copy does not need to pollute the parent component.


child components only receive the value of the parent component, and will not modify it

.
Menu