mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
docs(api): fix useAsyncData
example (#4549)
This commit is contained in:
parent
41d5cbbf3a
commit
e7bbf1693e
@ -56,12 +56,9 @@ By default, Nuxt waits until a `refresh` is finished before it can be executed a
|
|||||||
## Example
|
## Example
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
const { data, pending, error, refresh } = useAsyncData(
|
const { data, pending, error, refresh } = await useAsyncData(
|
||||||
'mountains',
|
'mountains',
|
||||||
() => $fetch('https://api.nuxtjs.dev/mountains),
|
() => $fetch('https://api.nuxtjs.dev/mountains')
|
||||||
{
|
|
||||||
pick: ['title']
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user