mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
docs: update api example for pick
(#22531)
This commit is contained in:
parent
53c706b575
commit
a4d1ee226a
@ -93,7 +93,9 @@ If you have not fetched data on the server (for example, with `server: false`),
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const { data, pending, error, refresh } = await useFetch('https://api.nuxtjs.dev/mountains',{
|
||||
const route = useRoute()
|
||||
|
||||
const { data, pending, error, refresh } = await useFetch(`https://api.nuxtjs.dev/mountains/${route.params.slug}`, {
|
||||
pick: ['title']
|
||||
})
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user