docs(api): fix useAsyncData example (#4549)

This commit is contained in:
Kevin LEVRON 2022-04-25 11:31:25 +02:00 committed by GitHub
parent 41d5cbbf3a
commit e7bbf1693e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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']
}
) )
``` ```