Plans from $25/month
This lesson is for members. Join us?
Subscribe now to get instant access to this course, plus a full library of Vue.js courses tailored to the plan you choose.
Fetch data with useAsyncData
In this lesson, we call the useAsyncData function to limit the request to OMDB only to the server side on initial page load.
Note: In the video I missed awaiting useAsyncData like this:
const { data } = await useAsyncData(() => {
return $fetch(`http://www.omdbapi.com/?apikey=8e3f600b&i=${route.params.id}`);
});
Links
Working with Async Data in Nuxt
8 lessons • 34 min9:21
6:38
NEXT CHAPTER
Next Level Nuxt Topics12 lessons • 1 hr
