Browsing index pages (2 articles)
↧
Vuex store is undefined in vue-router
I have a router and a global beforeEach hook to validate auth.import store from "@/store/store";const router = new Router({ // routes...});router.beforeEach((to, from, next) => { if...
View ArticleAnswer by tony19 for Vuex store is undefined in vue-router
This is indeed caused by the circular reference. You could avoid importing the store in router.js by using router.app, which provides a reference the associated Vue instance the router was injected to....
View Article
Browsing index pages (2 articles)