Answer the question
In order to leave comments, you need to log in
Is it true that a child component changes the parent's state?
Hello, please tell me, I have a parent component that passes an array of categories to the child, and the child, in turn, removes elements from this array during certain actions, is this behavior correct? Or is it necessary to strictly use v-model on the child component in such situations? And to receive changes from the child component only when the event is
dispatched. And of course, the child component has this:this.$emit('categories-updated',localCategories);
model: {
prop: 'categories',
event: 'categories-updated',
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question