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
- Implement a store with
getState,setState, andsubscribe. - In components, call
handle.onBeforeMount()to subscribe once. - On store updates, call
handle.update()from the subscription. - 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
More from itsjavi/vani
vani-spa-setup
Create a minimal Vani SPA root with explicit updates
8vani-jsx-setup
Configure and use JSX with Vani while keeping runtime behavior explicit
8vani-scheduling
Schedule explicit updates with microtasks and transitions
8vani-spa-app
Updates Vani SPA app UI in src/spa-app, especially the landing page/homepage and landing examples.
8vani-ssr-hydration
Implement SSR, hydration, and selective activation with Vani
8vani-async-client-only
Use async components, fallbacks, and client-only islands
8