I have
Parent.vue:
<parent>
<div v-for="item in data">
<child :prop="item"></child>
</div>
</parent>
Child.vue
<input v-model="prop.name">
Assume my data in Parent.vue has 4 elements. In parent component:
Step1: I add the fifth element (the fake one)
Step 2: I remove the fifth element (I call api to do so then call api again to reload data)
Step 3: I add new element => In Child.vue, the prop has the removed element value in step 2, not the one I just add
I don't understand why in step 3, the prop changes to removed element value, not the one I just add in Parent.vue. I checked that when I removed the fifth element, Child.vue already run into destroyed.
<input v-model="prop.name">
– Niklesh Raut