mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 01:45: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
|
||||
|
||||
```ts
|
||||
const { data, pending, error, refresh } = useAsyncData(
|
||||
const { data, pending, error, refresh } = await useAsyncData(
|
||||
'mountains',
|
||||
() => $fetch('https://api.nuxtjs.dev/mountains),
|
||||
{
|
||||
pick: ['title']
|
||||
}
|
||||
() => $fetch('https://api.nuxtjs.dev/mountains')
|
||||
)
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user