В моем компоненте Aop.vue у меня есть
mounted () {
this.$store.dispatch('switchSideNav', false)
...
console.log('COOKIE: ', this.$store.state('cookieAgreement'))
if (!this.$store.state('cookieAgreement')
.....
, это вызывает ошибку:
Error in mounted hook: "TypeError: this.$store.state is not a function"
Проверяя Vuex на DevTools, я вижу:
state
cookieAgreement:false
getters
getAllState: Object
cookieAgreement: false
почему this.store работает с .dispatch (), но не с .state ()?
обратная связь приветствуется