title: Vue / Nuxt.js - APIs being called twice in created hook
body: <p>I am currently developing in Nuxt.js and like most beginners, I wanted to know the best lifecycle hook to place API calls. Many resources I have found, much like the one below, state that the <code>created()</code> hook is the best place for fetching data from an API prior to having everything be loaded.</p>
  <p><a href="https://stackoverflow.com/questions/45813347/difference-between-the-created-and-mounted-events-in-vue-js">Difference between the created and mounted events in Vue.js</a></p>
  <p>My question came in when I noticed on the networking tab in developer options that my API within the <code>created()</code> hook was being called twice. After looking into this further, it states that this hook runs on server side and client side. I notice that <code>mounted()</code> only runs on client side so I am learning towards utilizing that hook. I did however notice that I can use some <code>if</code> logic (if process.server) in the <code>created()</code> hook to only have this run on the client / server and not both. Is this a common solution?</p>
  <p>To clarify my question further, if <code>created()</code> runs on both server and client side, why put my API calls in this hook?</p>