[Vuejs]-Access data inside dynamic components from parent component in VueJS + Vuex

0👍

Finally, I solved with a computed property that gives me the parent item. I don’t know if it is the best way or if there is a simpler one, but I think it is the correct one.

computed: Vuex.mapState({
    getParentItem(state) {
        return state.components[state.components.indexOf(this.index)];
    }
}),

Demo solved: https://codepen.io/Albvadi/pen/wvMrpLv

Leave a comment