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
My guess would be either not initialized store, or wrong this
context.
For the purposes of debugging I'd try using mapActions
helper
vuex.vuejs.org:
import { mapActions } from 'vuex'
export default {
methods: {
...mapActions({
add: 'increment' // map `this.add()` to `this.$store.dispatch('increment')`
})
// ...
}
// ...
}