V
V
Vladimir Golub2019-12-11 14:29:17
Vue.js
Vladimir Golub, 2019-12-11 14:29:17

How to call action from another state file?

State is divided into a module, how to call an action set in another file using dispatch.
If you create an action in the same file and call it, then everything works, but what about the modular architecture?
Project on nuxt.

dispatch('logger/logger'); - не работает
dispatch('testAction'); - работает

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex, 2019-12-11
@RazerVG

dispatch('logger/logger', null, { root: true });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question