Skip to content

Commit

Permalink
docs: add note for useState usage (nuxt#1901)
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz authored Nov 15, 2021
1 parent f298386 commit 1a8fc3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/content/3.docs/1.usage/2.state.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a8fc3d

Please sign in to comment.