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...
Editer cette page sur GitHub
Mise à jour le Mon, July 12, 2021