vani-global-store

Installation
SKILL.md

Global Store with Subscriptions

Instructions for implementing a small store and wiring components to it.

When to Use

Use this when multiple components need shared state without implicit reactivity by default.

Steps

  1. Implement a store with getState, setState, and subscribe.
  2. In components, call handle.onBeforeMount() to subscribe once.
  3. On store updates, call handle.update() from the subscription.
  4. Keep mutations behind store commands to avoid stale views.

Arguments

  • stateShape - description of the state object (defaults to {})
  • storeFile - path to the store module (defaults to src/store.ts)
Related skills
Installs
6
Repository
itsjavi/vani
First Seen
Jan 24, 2026