[Vuejs]-NuxtJs Vuex | Unexpected token when I trying to use …mapGetters or …mapActions

0👍

First of fall, computed is a property, not a function

export default {
   computed: {
      /***/
   }
}

And Second, You are using module ( user, in your case ) system to initiate the store. You also need to mention the module name when you are mapping the store ( expect for index.js ), like so

computed: {
     ...mapGetters("user", ["currentUser"])
   }

Leave a comment