title: How to structure api calls in Vue.js?
body: <p>I'm currently working on a new Vue.js application. It depends heavily on api calls to my backend database. </p>
  
  <p>For a lot of things I use Vuex stores because it manages shared data between my components. When looking at other Vue projects on github I see a special vuex directory with files that handles all the actions, states and so on. So when a component has to call the API, it includes the actions file from the vuex directory.</p>
  
  <p>But, for messages for example, I don't want to use Vuex because those data is only important for one specific view. I want to use the component specific data here. But here is my problem: I still need to query my api. But I shouldn't include the Vuex actions file. So in that way I should create a new actions file. This way I have a specific file with api actions for vuex and for single components.</p>
  
  <p>How should I structure this? Creating a new directory 'api' that handles actions for both vuex data and component-specific data? Or separate it?</p>