Answers for "vuex access getters in mutatuons"

0

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);
  }
}
Posted by: Guest on June-17-2020

Browse Popular Code Answers by Language