You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue happens when the user clicks on some of the items in the list.
What is expected?
The action should be dispatched
What is actually happening?
this.$store undefined error is got
The root of the problem seems to be placing a custom component inside a <v-template> block, as I tested using the same custom component outside the <v-template> and it worked.
The text was updated successfully, but these errors were encountered:
Could be related, but the issue is the odd parent/child relations in some components (ListView/v-template, Frame etc). The workaround for now is to register the store to the vue prototype as well: Vue.prototype.$store = store - this way you can access the store from any Vue component, and not just descendants of the root vue instance.
Also the comment you linked is no longer the case, I've since refactored it and it doesn't need to create proxies anymore.
Version
2.2.1
Reproduction link
https://github.com/msaelices/vuex-error-in-v-template
Platform and OS info
NS 5.3
Steps to reproduce
Let review the following Vue application with Vuex (see the github repo for a complete app):
app/components/App.vue
app/components/MyComponent.vue
The issue happens when the user clicks on some of the items in the list.
What is expected?
The action should be dispatched
What is actually happening?
this.$store undefined error is got
The root of the problem seems to be placing a custom component inside a
<v-template>
block, as I tested using the same custom component outside the<v-template>
and it worked.The text was updated successfully, but these errors were encountered: