[Vuejs]-Differences between data in vue

1👍

This sound to me like a bad async handling, Axios (and any other AJAX library), send the request asynchronously. It look like you thought that the rendering would wait for the ajax request to finish, but it is not. Try convert the axios call into Async/Await:

async function getStories() {
  const data = await axios.get("/stories");

  return data;
}

or for short:

async function getStories() {
  return await axios.get("/stories");
}

then in your hydration function:

this.storiesData = await getStories();

Leave a comment