2022-03-30 15:59:28 +00:00
---
template: Example
---
2022-04-06 05:56:08 +00:00
# `useState`
2022-03-30 15:59:28 +00:00
`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=👉}
2022-04-06 05:56:08 +00:00
Learn more about [useState ](/api/composables/use-state ).
::
::ReadMore{link="/api/composables/use-state"}
::
2022-09-13 12:54:31 +00:00
::ReadMore{link="/getting-started/state-management"}
2022-03-30 15:59:28 +00:00
::
::sandbox{repo="nuxt/framework" branch="main" dir="examples/composables/use-state" file="app.vue"}