From 1a8fc3dd1db6a2de0daff462f21c3fbc689a9d9d Mon Sep 17 00:00:00 2001 From: webfansplz <308241863@qq.com> Date: Mon, 15 Nov 2021 18:30:38 +0800 Subject: [PATCH] docs: add note for `useState` usage (#1901) --- docs/content/3.docs/1.usage/2.state.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/content/3.docs/1.usage/2.state.md b/docs/content/3.docs/1.usage/2.state.md index cb58f87a94..378cfe7696 100644 --- a/docs/content/3.docs/1.usage/2.state.md +++ b/docs/content/3.docs/1.usage/2.state.md @@ -8,6 +8,10 @@ Within your pages, components and plugins you can use `useState`. It can be used You can think of it as an SSR-friendly ref in that its value will be hydrated (preserved) after server-side rendering. It is shared across all components. +::alert{icon=👉} +**`useState` only works during `setup` or `Lifecycle Hooks`** +:: + ### Usage ```js