mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 09:25:54 +00:00
docs: add note for useState
usage (#1901)
This commit is contained in:
parent
f298386795
commit
1a8fc3dd1d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user