title: Call vuex getters from Vue-Router
body: <p>Is it possible to call vuex getters from the router?
  I need to check the state of a boolean variable from beforeach hook:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>router.beforeEach(function ({ to, next }) {
      if (to.path !== '/login') {
          // return a Promise that resolves to true or false
          return the-needed-variable-from-store;
      } else {
          next()
      }
  })</code></pre>
  </div>
  </div>
  
  How can I get and check the variable derived from the store?</p>
  
  <p>Thanks a lot!</p>