call action from another store #14074
-
Hi, I have two stores (foo, bar) [quasar v1] In foo actions I want to call a bar action. I understand what this should work, but it doesn't work
I get this error:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You haven't shared important details like which state management library you are using, But, what it's more important, this is not Quasar related, so next time try to post it to relevant repository. |
Beta Was this translation helpful? Give feedback.
You haven't shared important details like which state management library you are using,
Vuex
orPinia
. I'm guessing it'sVuex
, and if that's the case, you need to call it with theroot
parameter set totrue
:dispatch('anotherModule/anotherAction', {}, { root:true })
.https://stackoverflow.com/questions/42984132/is-there-a-way-to-dispatch-actions-between-two-namespaced-vuex-modules
But, what it's more important, this is not Quasar related, so next time try to post it to relevant repository.