call an action from another action vuex code example
Example 1: how to call action from another module vuex
// action from one moduleA to moduleB
dispatch('moduleB/actionName', payload, { root:true })
Example 2: vuex call action from another action
actions:{
get1: ({ commit, dispatch }) => {
dispatch('get2');
},
get2: ({commit}) => {
//things
},
}