From 934db6b584ee48f0aae2eb334523b33a903f91b3 Mon Sep 17 00:00:00 2001 From: webfansplz <308241863@qq.com> Date: Mon, 15 Nov 2021 18:30:59 +0800 Subject: [PATCH] docs: add note for `useFetch` usage (#1877) --- docs/content/3.docs/1.usage/1.data-fetching.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/content/3.docs/1.usage/1.data-fetching.md b/docs/content/3.docs/1.usage/1.data-fetching.md index cd3ac72acc..085f932274 100644 --- a/docs/content/3.docs/1.usage/1.data-fetching.md +++ b/docs/content/3.docs/1.usage/1.data-fetching.md @@ -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