In VueJS 2.0, you must pass both state
and getters
.
Getters are passed to other getters as the 2nd Argument:
export default foo = (state, getters) => {
return getters.yourGetter
}
Take a look at Official documentation:ย https://vuex.vuejs.org/guide/getters.html#property-style-access