vuex getter in mutation code example
Example: vuex access getters in mutatuons
// Vuex store mutation methods do not provide direct access to getters.
actions: {
fooAction({commit, getters}, data) {
commit('FOO_MUTATION', {data, getters})
}
},
mutations: {
FOO_MUTATION(state, {data, getters}) {
console.log(getters);
}
}