title: How to access vue instance in Vuex
body: <p>I declare a global variable in the <code>main.js</code> of the Vue.js project.</p>
  
  <pre><code>Vue.prototype.$API = "myapihere"
  </code></pre>
  
  <p>And I want to use this from everywhere.
  and it's work properly by using <code>this.$API</code>.</p>
  
  <p>But in Vuex it does not work.</p>
  
  <pre><code>console.log(this.$API);
  </code></pre>
  
  <p>Here <code>this.$API</code> is <strong>undefined</strong>.</p>
  
  <p>How I use my <code>$API</code> in Vuex.</p>