---
title: "State Management"
description: "This example shows how to use the `useState` composable to create a reactive and SSR-friendly shared state across components."
canonical_url: "https://nuxt.com/docs/4.x/examples/features/state-management"
---
# State Management

> This example shows how to use the `useState` composable to create a reactive and SSR-friendly shared state across components.

<code-explorer default-value="app.vue" path="examples/features/state-management">



</code-explorer>

<browser src="https://state-management.example.nuxt.space">



</browser>

<read-more to="https://nuxt.com/docs/getting-started/state-management">



</read-more>

<read-more to="https://nuxt.com/docs/api/composables/use-state">



</read-more>

---

- [Source](https://github.com/nuxt/examples/tree/main/examples/features/state-management)


## Sitemap

See the full [sitemap](https://nuxt.com/sitemap.md) for all pages.
