title: Using Axios in VUEX state on loading application and using AXIOS in Component
body: <p>I am unable to resolve the following problem at the moment.</p>
  <p>1.When you have successfully logged in, the following code will be called in Layout.vue to create a state. (You will then go directly to: /dashboard)</p>
  <pre><code>mounted() {
      this.$store.dispatch(DCOMPONENTS);
  }
  </code></pre>
  <p>2.Then I go to /sales and a dispatch is done again within the Sales.vue component:</p>
  <pre><code>methods: {
           async loadTable() {
           await this.$store
            .dispatch(SALES)
              let tableName = 'SalesTable';
              var components = this.getComponents;
              var sales = this.getSales;
              var i;
            
              for (i = 0; i &lt; components.length; i++) {
                if (components[i].name == tableName) {
                  var structure = components[i];
                }
              }
  
              var jsonData = {};
              jsonData.structure = structure;
              jsonData.data = sales;
              this.structureTable = jsonData;
              this.dynamicComponent = Tables;
        },
  </code></pre>
  <p>Normally this goes well. When I am in / dashboard, time is lost navigating to / sales, so that the first AXIOS call is also ready, when the second AXIOS call via (dispatch) is also ready in the component, I have all the data.</p>
  <p>However, the problem:
  When I am logged in and I am in /sales as a route. Press F5 (refresh), then it may be in some cases that the first AXIOS call (from Layout.vue) is not yet ready while the AXIOS call via (Sales.vue) is ready. I am missing data so that my Array is not filled.</p>
  <p>My question:
  How can I ensure that the first AXIOS call made in Layout.vue (which stores the first data in STATE) is always ready before I make a new AXIOS call (dispatch) in Sales.vue?</p>