[Vuejs]-Vuex Store Unknown Getters with Nuxt

0👍

Getters should be exported as objects not function.

As Bert already mentioned in the comment how to declare getters. But it was trouble some to find the solutions at first glance. So here is the formated answer.

const getters = {
  filterCategory: state => state.categories,
}

export default getters

Credit to Bert

Leave a comment