Answers for "vuex dispatch action from another module"

4

how to call action from another module vuex

// action from one moduleA to moduleB
dispatch('moduleB/actionName', payload, { root:true })
Posted by: Guest on May-29-2020
9

vuex call action from another action

actions:{ 
  get1: ({ commit, dispatch }) => {
    dispatch('get2');
  },
  get2: ({commit}) => {
    //things
  },
}
Posted by: Guest on June-13-2020
0

How to dispatch from another module vuex

// from the gameboard.js vuex module
dispatch('notification/triggerSelfDismissingNotifcation', {...}, {root:true})
Posted by: Guest on April-30-2021

Code answers related to "vuex dispatch action from another module"

Code answers related to "Javascript"

Browse Popular Code Answers by Language