I'm trying to call my namespaced store:
methods: {
...mapActions('Modal', [
'toggleActive',
]),
close: () => {
this.toggleActive();
}
Which results in the error:
Uncaught TypeError: Cannot read property 'toggleActive' of undefined
Doing the following works:
close: function() {
this.toggleActive();
}
How can I use ES6 function syntax with vue/vuex?