Nuxt/docs/content/4.examples/3.composables/use-state.md
Clément Ollivier 1a7b570c82
docs(examples): add examples to docs (#3966)
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
2022-03-30 17:59:28 +02:00

14 lines
376 B
Markdown

---
template: Example
---
# useState
`useState` is an SSR-friendly ref replacement. Its value will be preserved after server-side rendering and shared across all components using a unique key.
::alert{type=info icon=👉}
Learn more about [useState](/docs/usage/state).
::
::sandbox{repo="nuxt/framework" branch="main" dir="examples/composables/use-state" file="app.vue"}