title: How to access Vuex module actions from a component
body: <p>I define a store with two modules, and I'm trying to access one module action, I tried to do</p>
  
  <pre><code>this.$store.dispatch('load');
  </code></pre>
  
  <p>But I get:</p>
  
  <blockquote>
    <p>[vuex] unknown action type: load</p>
  </blockquote>
  
  <p>I tried another options, thing that I found in google , but nothing worked, what is the right way to access module actions?</p>
  
  <p>This is my code:</p>
  
  <p>Vuex definition:</p>
  
  <pre><code>let session = require('./store/session.js');
  let options = require('./store/options.js');
  const store = new Vuex.Store({
      modules: {
          session: session,
          options: options,
      },
  });
  </code></pre>
  
  <p>options.js</p>
  
  <pre><code> export default {
      state: {
          data: null,
      }, 
      mutations: {
          setOptions (state, payload) {
              console.log(payload);
          } 
      },
      actions: { 
          load( { commit }) {
              $.getJSON('options')
              .then(function (data) {
                  commit('setOptions', data);
              });
          }
      },
      getters: {
  
      }
  
  }
  </code></pre>
  
  <p>and my app component:</p>
  
  <pre><code>export default {
      beforeCreate() {
           this.$store.dispatch('load');
      }
  }
  </code></pre>
  
  <p>my vue build:</p>
  
  <pre><code>new Vue({
      el: "#app",
      router,
      store,
      render: h =&gt; h(App)
  });
  </code></pre>