How to optimize if too much data is transferred between the vue child component and the parent component

clipboard.png
like this

Apr.14,2021

vuex to learn about


this depends. For example, if the parent component passes the name,age data, can I pass only one object info {name:, age:}? But not all the time. There is also whether the subcomponents can continue to be split in a little more detail, so that there is no need to pass all the data into one. And I wish there was nothing wrong with your function, ah, if it was ugly, it would be ugly.


circumstances permit. Just pass all the parameters as one object


pass json object data, param: {key1:value1,key2:value2}


<son v-bind="object"/>

data integration supported by props is passed to subcomponents all at once by Object,

Menu