diff --git a/docs/content/3.docs/1.usage/1.data-fetching.md b/docs/content/3.docs/1.usage/1.data-fetching.md index e9ed2be9d7..325096ba04 100644 --- a/docs/content/3.docs/1.usage/1.data-fetching.md +++ b/docs/content/3.docs/1.usage/1.data-fetching.md @@ -82,7 +82,9 @@ const { data } = await useFetch('/api/count') The data returned by `useAsyncData` will be stored inside the page payload. This means that every key returned that is not used in your component will be added to the payload. -**We strongly recommend to only select the keys that you will use in your component.** +::alert{icon=👉} +**We strongly recommend you only select the keys that you will use in your component.** +:: Imagine that `/api/mountains/everest` returns the following object: @@ -112,3 +114,33 @@ const { data: mountain } = await useFetch('/api/mountains/everest', { pick: ['ti
{{ mountain.description }}
``` + +### Using async setup + +If you are using `async setup()`, the current component instance will be lost after the first `await`. (This is a Vue 3 limitation.) If you want to use multiple async operations, such as multiple calls to `useFetch`, you will need to use `