title: declare mapState and mapMutations globally in SPA VueJS
body: <p>I am creating a basic SPA, but it happens that the states I manage with Vuex and the mutations up there all right, but in each component that I want to use mapState and mapMutations I have to import them locally.</p>
  
  <pre><code>&lt;script&gt;
      import {mapState,mapMutations  } from 'vuex';
      export default{
          computed : mapState(['isLoggedIn']),
          methods: {
              ...mapMutations(['logout'])
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>This is the correct way to do it? Or how can I declare them globally and avoid importing in each component so that it is as follows?</p>
  
  <pre><code>&lt;script&gt;   
  
      export default{
          computed : mapState(['isLoggedIn']),
          methods: {
              ...mapMutations(['logout'])
          }
      }
  &lt;/script&gt;
  </code></pre>