mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
docs: add note for useFetch
usage (#1877)
This commit is contained in:
parent
1a8fc3dd1d
commit
934db6b584
@ -52,6 +52,10 @@ Within your pages, components and plugins you can use `useFetch` to get universa
|
||||
|
||||
This composable provides a convenient wrapper around `useAsyncData` and `$fetch` and automatically generates a key based on url and fetch options and infers API response type.
|
||||
|
||||
::alert{icon=👉}
|
||||
**`useFetch` only works during `setup` or `Lifecycle Hooks`**
|
||||
::
|
||||
|
||||
### Usage
|
||||
|
||||
```ts
|
||||
|
Loading…
Reference in New Issue
Block a user