Answers for "vuex access getters from actions"

2

vuex access getters from actions

getters: {
    getAppData: state => () => {
        return state.data;
    }
}
actions: {
    sendDataToServer({ commit , getters }, payload) {
        // call getter 
        const data = getters.getAppData
    }
},
Posted by: Guest on June-16-2020

Code answers related to "vuex access getters from actions"

Browse Popular Code Answers by Language