cannot read property 'dispatch' of undefined in Vuex

后端 未结 10 731
囚心锁ツ
囚心锁ツ 2020-12-30 03:51

I\'m trying to perform a dispatch on \'logOutUser\' in vuex store, and i\'m getting the following error message in respone:

TypeError: Cannot read pro

10条回答
  •  一个人的身影
    2020-12-30 04:01

    I have faced the same issue because missed importing "store". Solved it as :

    import store from './store'
    
    new Vue({
      el: '#app',
      store,
      render: h => h(App),
    })
    

提交回复
热议问题