docs: add note for useFetch usage (#1877)

This commit is contained in:
webfansplz 2021-11-15 18:30:59 +08:00 committed by GitHub
parent 1a8fc3dd1d
commit 934db6b584
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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