title: How to correctly make API calls inside store.js using Vuex to update data?
body: <p>I am currently trying to implement vuex in my project. And I have learn about mutations/actions to update the state properties. I wanted to know what is safest and efficient way to update the state components by fetching data from API. For example :</p>
  
  <p>Store.js</p>
  
  <pre><code>export default {
      state {
          prop1:'',
          prop2:''
      }
  
      actions {
          //how to call API here and update the prop1 and prop2 value
      }
  }
  </code></pre>