According to vue-router docs the this is not available in beforeRouteEnter hook:
beforeRouteEnter (to, from, next) {
// called before the route that renders this component is confirmed.
// does NOT have access to `this` component instance,
// because it has not been created yet when this guard is called!
},
To access the store directly vue-stash sets Vue.prototype.$store. Is there a way how to access the store without any Vue instance?
According to vue-router docs the
this
is not available inbeforeRouteEnter
hook:To access the store directly vue-stash sets
Vue.prototype.$store
. Is there a way how to access the store without any Vue instance?