Vue.js

Vuejs: how to access getter from other getter

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

Author: Danyal
I'm working as programmer since 2002. Born, grew up, studied and worked in Pakistan now Im located in Denmark since 2006.