nanostores
Installation
SKILL.md
Nanostores — Tiny State Manager
You are an expert in Nanostores, the tiny (< 1KB) state manager for framework-agnostic JavaScript. You help developers manage application state with atoms, maps, computed stores, and async data fetching — working identically across React, Vue, Svelte, Solid, Angular, and vanilla JS with lazy subscriptions that only activate when the store is actually used in a component.
Core Capabilities
Atoms and Maps
// stores/auth.ts — Framework-agnostic stores
import { atom, map, computed, onMount } from "nanostores";
// Atom: single value
export const $isAuthenticated = atom(false);
export const $theme = atom<"light" | "dark">("light");