title: Vue/Vuex unknown action type
body: <p>I have started implementing Vuex in my application and I decided to split my store into modules.</p>
  <p>For the beginning I created only one module to test how Vuex modules works because I didn't have any previous experience with it.</p>
  <p>I created a modules folder and inside I have one folder for my module called <strong>Company</strong>. Inside the company folder I have created next files: <strong>action.js, getters.js, index.js, mutations.js</strong>.</p>
  <p>The code inside these files:</p>
  <p><strong>action.js</strong>:</p>
  <pre><code>import api from '@/vuex/utils/api'
  
  const getCompanies = (context) =&gt; {
      api.get('/57/companies').then(response =&gt; {
          context.commit('GET_COMPANIES', response)
      }).catch((error) =&gt; {
          console.log(error)
      })
  }
  
  export default {
      getCompanies
  }
  </code></pre>
  <p><em>NOTE: Inside the <strong>api</strong> that i import i just created methods for basics operations(get,post,delete,etc...)</em></p>
  <p><strong>getters.js:</strong></p>
  <pre><code>const allCompanies = state =&gt; state.companies
  
  export default {
      allCompanies
  }
  </code></pre>
  <p><strong>mutations.js:</strong></p>
  <pre><code>const GET_COMPANIES = (state, companies) =&gt; {
      state.companies = companies
  }
  
  export default {
    GET_COMPANIES
  }
  </code></pre>
  <p><strong>index.js:</strong></p>
  <pre><code>import actions from './action'
  import getters from './getters'
  import mutations from './mutations'
  
  const state = {
    companies: []
  }
  
  export default {
    namespaced: true,
    state,
    actions,
    getters,
    mutations
  }
  </code></pre>
  <p>After creation of this module I have added it to my store like this:</p>
  <p><strong>store.js:</strong></p>
  <pre><code>import Vue from 'vue'
  import Vuex from 'vuex'
  import companyModule from './modules/company'
  
  Vue.use(Vuex)
  
  const store = new Vuex.Store({
    modules: {
      company: companyModule
    }
  })
  
  export default store
  </code></pre>
  <p><em>NOTE I have told my vue app to use this store inside <strong>main.js</strong> file</em></p>
  <p>To test this I have created simple HelloWorld component where I attempted to load the data inside simple html table. Here the problem showed up. Inside the <strong>mounted</strong> hook i have dispatched my action called <strong>getCompanies</strong> and I can see the data inside my table, its there, but i am getting error inside my dev console telling me:</p>
  <blockquote>
  <p>vuex.esm.js?358c:417 [vuex] unknown action type: getCompanies</p>
  </blockquote>
  <p>Code for HelloWorld component:</p>
  <pre><code>import { mapGetters } from 'vuex'
  
  ...
   
  computed: {
      ...mapGetters({
          companies: 'company/allCompanies'
       })
  }
  
  ...
  
  mounted () {
      this.$store.dispatch('company/getCompanies')
  }
  
  ...
  </code></pre>
  <p>Data is present in my store, check screenshot from my vue devtools:
  <a href="https://i.stack.imgur.com/AoFvl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AoFvl.png" alt="vuedevtools" /></a></p>
  <blockquote>
  <p>So my question is why am I getting this error inside my console, am I missing something, and how is it working with that error. Thanks!</p>
  </blockquote>