mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 07:32:01 +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