title: Recurring this.$store.commit is not a function issue
body: <p>I'm using vue.js for the first time and I'm having an issue I've researched but not gotten to the bottom of yet. For advice so far, I've found these articles: </p>
  
  <p><a href="https://laracasts.com/discuss/channels/vue/vuex-anybody-typeerror-thisstorecommit-is-not-a-function?page=1" rel="nofollow noreferrer">https://laracasts.com/discuss/channels/vue/vuex-anybody-typeerror-thisstorecommit-is-not-a-function?page=1</a></p>
  
  <p><a href="https://stackoverflow.com/questions/46416012/uncaught-typeerror-this-store-commit-is-not-a-function">Uncaught TypeError: this.$store.commit is not a function</a></p>
  
  <p><a href="https://forum.vuejs.org/t/vuex-this-store-commit-is-not-a-function/31001" rel="nofollow noreferrer">https://forum.vuejs.org/t/vuex-this-store-commit-is-not-a-function/31001</a></p>
  
  <p><a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=7&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjk_I-AhejbAhWPv1MKHRjMAyEQFghtMAY&amp;url=https%3A%2F%2Falligator.io%2Fvuejs%2Fintro-to-vuex%2F&amp;usg=AOvVaw2Pimf2n5yvOU5NpRsaCfCz" rel="nofollow noreferrer">https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=7&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwjk_I-AhejbAhWPv1MKHRjMAyEQFghtMAY&amp;url=https%3A%2F%2Falligator.io%2Fvuejs%2Fintro-to-vuex%2F&amp;usg=AOvVaw2Pimf2n5yvOU5NpRsaCfCz</a></p>
  
  <p>I have this store: </p>
  
  <pre><code>import Vue from 'vue';
  import Vuex from 'vuex';
  
  const state = {
    loggedIn: false
  }
  
  const mutations = {
    truthify: state =&gt; state.loggedIn = true
  }
  
  const getters = {
    loggedIn: state = state.loggedIn
  }
  
  const store = new Vuex.Store {
    state,
    getters,
    mutations,
    actions
  }
  
  export default store;
  </code></pre>
  
  <p>Pointing to this component: </p>
  
  <pre><code>&lt;template&gt;
    &lt;div class="login"&gt;
      &lt;div id="loginMain"&gt;
      &lt;form&gt;
        &lt;label for="username"&gt;Username:&lt;/label&gt;
        &lt;input type="text" id="username"&gt;&lt;/input&gt;
        &lt;label for="password"&gt;Password:&lt;/label&gt;
        &lt;input type="text" id="password"&gt;&lt;/input&gt;
        {{ loggedIn }}
        &lt;input type="button" value="submit" id="post-form" @click="testLogin"/&gt;
      &lt;/form&gt;
    &lt;/div&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  &lt;script&gt;
  import { mapState, vuex } from 'vuex'
  import store from '@/store/'
  
  export default {
    name: 'Login',
    data: function() {
        return {
          loggedIn: ''
        }
    },
    computed: {
      returnMessage: function() {
        return this.$store.state.loggedIn
      }
  
    },
    methods: {
      testLogin(){
        console.log('foo');
        this.$store.commit('truthify');
      }
    },
    store: store,
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm not sure what the issue is.</p>