VUEX Response of Dispatch VUE

How can I catch the response of a vuex dispatch from another component? So in case the response, for example, is 200 I do something else.

this.$store.dispatch("setTrigger");

The setTrigger is in the store.js and I call dispatch from within a component.

Should I use states and getters also ? Is this the best practice?



Read more here: https://stackoverflow.com/questions/67378834/vuex-response-of-dispatch-vue

Content Attribution

This content was originally published by MEAG at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: