2022-03-30 15:59:28 +00:00
|
|
|
---
|
2022-10-06 09:15:30 +00:00
|
|
|
title: "useAsyncData"
|
|
|
|
description: "This example shows how to use useAsyncData to fetch data from an API endpoint."
|
|
|
|
toc: false
|
2022-03-30 15:59:28 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
::alert{type=info icon=💡}
|
2022-04-16 13:53:36 +00:00
|
|
|
Nuxt will automatically read files in the `~/server/api` directory to create API endpoints.
|
2022-03-30 15:59:28 +00:00
|
|
|
::
|
|
|
|
|
2022-04-06 05:56:08 +00:00
|
|
|
::ReadMore{link="/api/composables/use-async-data"}
|
|
|
|
::
|
|
|
|
|
2022-09-13 12:54:31 +00:00
|
|
|
::ReadMore{link="/getting-started/data-fetching"}
|
2022-03-30 15:59:28 +00:00
|
|
|
::
|
|
|
|
|
|
|
|
::sandbox{repo="nuxt/framework" branch="main" dir="examples/composables/use-async-data" file="app.vue"}
|
2022-10-06 09:15:30 +00:00
|
|
|
::
|