asyncData Hook
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 CodeSandbox...