• Skip to primary navigation
  • Skip to content
  • Skip to footer
Never test
  • About
  • Categories
  • Tags
    Calling an Action in Another Module from Vuex
    1. Home
    2. /
    3. It
    4. /
    5. Calling an Action in Another Module from Vuex
    YoungSeon.Ahn

    YoungSeon.Ahn

    I am an ordinary person.

    • S.Korea
    • Twitter
    • Facebook
    • GitHub
    • Resume
    • Email

    Calling an Action in Another Module from Vuex

    less than 1 minute read

    You can use dispatch.

    const callActionInOtherModule = async (store, { payload }) => {
      try {
        store.dispatch("moduleB/actionName", { payload }, { root: true });
      } catch (e) {
        console.error(e);
      }
    };
    

    Make sure to include { root: true }.

    Tags: JavaScript, Vue.js, Vuex

    Categories: IT

    Updated: September 22, 2020

    Share on

    Twitter Facebook LinkedIn
    Previous Next

    Leave a comment

    You may also enjoy

    lefthook 동작 원리 — linked worktree 에서 install 하면 안 되는 이유

    1 minute read

    환경

    How lefthook works — why you should never run install in a linked worktree

    1 minute read

    Environment

    잘 돌아가던 Playwright e2e test가 전부 깨지는 건에 대하여

    1 minute read

    환경

    On the Matter of Perfectly Working Playwright e2e Tests All Breaking

    2 minute read

    Environment

    • Follow:
    • Twitter
    • Facebook
    • GitHub
    • Feed
    © 2026 Never test. Powered by Jekyll & Minimal Mistakes.