I have a child component SecondPage.vue. Props are passed to this component from parent component. Props are passed to child on click event. Then I'm trying to copy these props to data in SecondPage.vue. But when I use vue devtools, I can see, that data in child component is clear.
According to devtools, after click props in child are provided, but data (genQ, isA) is empty.
Where is the mistake?
SecondPage.vue
export default {
name: "SecondPage",
props: ["generalQuestInfo", "isActive", "getIconClass"],
data: function(){
return {
genQ: Object.assign({}, this.generalQuestInfo), //empty in devtools
isA: this.isActive //empty in devtools
}
}
}
SecondPageto be displayed on routed page, but when I click that page, props are cleared. And now I'm trying to save these props to data in child component and use it instead props. And I hope this could help. stackoverflow.com/questions/57240303/… - Yurii