asyncData Hook
In this example we use asyncData to fetch our data from our API.
In this example:
pages/index.vue
and pages/posts/_id
use the asyncData
hook and the $http
module to fetch our list of mountains from our API.
Learn more about the http module .
Learn more about the asyncData hook the Features book in the Data Fetching chapter.
Loading Sandbox...
Edit this page on GitHub
Updated at Mon, Jul 12, 2021