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