• Skip to primary navigation
  • Skip to content
  • Skip to footer
Never test
  • About
  • Categories
  • Tags
    Vuex에서 다른 모듈의 action 호출하기
    1. Home
    2. /
    3. It
    4. /
    5. Vuex에서 다른 모듈의 action 호출하기
    YoungSeon.Ahn

    YoungSeon.Ahn

    I am an ordinary person.

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

    Vuex에서 다른 모듈의 action 호출하기

    less than 1 minute read

    dispatch를 쓰면 된다.

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

    { 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

    import 한 줄이 e2e test 를 깨뜨리다

    4 minute read

    기술 스택

    e2e exposed an init order race

    5 minute read

    Tech stack

    HTML 테이블에서 “일부 컬럼만 가변폭” 만들기 — min-width가 안 먹힐 때

    2 minute read

    목표

    Making Only Some Columns Flexible-Width in an HTML Table — When min-width Just Won’t Work

    3 minute read

    Goal

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