question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to call another module action from a module?

See original GitHub issue

Say I have 2 modules A and B. How can I call an action of module B from an action of module A? It would be easy if I can access context though.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
kpturnercommented, Jan 5, 2019

@erathorus I can’t see any example in that repo of one module action calling another module action - just references to this.context. Is that what you are referring to?

I am expecting to see something like this:

MODULE A
@Action(...)
public async myaction(): Promise<void> {
    foo = getModule(ModuleB, store);
    await foo.asyncAction();
}
2reactions
erathoruscommented, Dec 18, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to dispatch actions between two namespaced ...
E.g. I have Vuex modules "gameboard" and "notification". Each are namespaced. I would like to dispatch an action from the gameboard module ......
Read more >
Dispatch an action in another Vuex module - Koen Woortman
In order to call an action in a different Vuex module you need to pass {root: true} as the third argument of the...
Read more >
Vuex - Access module action from a module's action - Get Help
I'm trying to call a dispatch inside module (cart-module) from an action in module (auth-module) and I get this error
Read more >
Can we pull service method to other module? - OutSystems
Hi Ajit,. you can call a service action from another module in the same environment. A service action is a REST based call,...
Read more >
call action from another module vuex - Code Grepper
action from one moduleA to moduleB dispatch('moduleB/actionName', payload, { root:true })
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found