---
stable_id: skills/skills-sh-antfu-skills-vueuse-functions
type: skills
title: skills-sh-antfu-skills-vueuse-functions
summary: |-
  ---
  category: State
  related: createSharedComposable
  ---
  # createGlobalState
  Keep states in the global scope to be reusable across Vue instances.
  ## Usage
  ### Without Persistence (Store in Memory)
  ```ts
  // store.ts
tags:
  - skills-sh
  - skills-sh-all-time
source_url: https://raw.githubusercontent.com/antfu/skills/HEAD/skills/vueuse-functions/references/createGlobalState.md
license: ""
upstream_ref: https://skills.sh/antfu/skills/vueuse-functions
github_stars: 4218
github_forks: 211
github_is_organization: false
retrieved_at: 2026-06-11T08:33:22.998Z
content_sha256: 43a260724cb8610553d487a4cd59591efbc61a9876c07dbea04b07381ca7479f
---
