title: Using vuex inside a manually-mounted vue component
body: <p>I'm manually mounting a component to a dynamic element using <code>Vue.extend</code> like this:</p>
  
  <pre><code>import Vue from 'vue';
  import MyComponent from 'MyComponent.vue';
  
  const MyComponentConstructor = Vue.extend(MyComponent);
  const MyComponent = new MyComponentConstructor({
      propsData: {
          foo: 123,
      },
  }).$mount('#mount-point');
  </code></pre>
  
  <p>When I manually mount a component in this way, I can't use <code>vuex</code> inside <code>MyComponent.vue</code>.:</p>
  
  <pre><code>// (inside MyComponent.vue)
  this.$store.commit('setSomething', true);
  </code></pre>
  
  <p>I get this:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'commit' of undefined</p>
  </blockquote>
  
  <p>Of course <code>vuex</code> is set up and working fine in the other normal components. Is there something I can pass to the constructor to get it to work?</p>