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
- [Vuejs]-How to get the number of Vue components rendered in the DOM?
- [Vuejs]-Created hook not waiting for beforeEach action promise to resolve
Source:stackexchange.com