Is there a way to dispatch actions between two namespaced vuex modules? Is there a way to dispatch actions between two namespaced vuex modules? vue.js vue.js

Is there a way to dispatch actions between two namespaced vuex modules?


You just need to specify that you're dispatching from the root context:

// from the gameboard.js vuex moduledispatch('notification/triggerSelfDismissingNotifcation', {...}, {root:true})

Now when the dispatch reaches the root it will have the correct namespace path to the notifications module (relative to the root instance).

This is assuming you're setting namespaced: true on your vuex store module.