• 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
    • Email
    • Twitter
    • Facebook
    • GitHub
    • 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

    L4 로드밸런서 + Nginx 환경에서 trailing slash 리디렉션이 HTTP 로 떨어지는 이슈와 해결법

    2 minute read

    L4 로드밸런서 + Nginx 환경에서 trailing slash 리디렉션이 HTTP 로 떨어지는 이슈와 해결법

    청동기 시대의 붕괴와 고대 이탈리아 민족의 형성

    24 minute read

    청동기 시대의 붕괴와 고대 이탈리아 민족의 형성

    Galaxy S21 WebView 동영상 녹색 화면 이슈 디버깅 및 해결

    15 minute read

    Galaxy S21 WebView 동영상 녹색 화면 이슈 디버깅 및 해결

    라우트-단위 코드 스플리팅 — React Data Router v7 + Vite 조합으로 “진짜” Lazy Route 만들기

    3 minute read

    라우트-단위 코드 스플리팅 — React Data Router v7 + Vite 조합으로 “진짜” Lazy Route 만들기

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