Reactive localStorage, sessionStorage, IndexedDB and cookies for Vue 3 (and React) — TTL, encryption, schema migrations, undo/redo, and cross-tab sync.

useStorage works with localStorage, sessionStorage, IndexedDB, and in‑memory via a single interface. Reactive Refs for Vue and useSyncExternalStore for React automatically sync state with the chosen backend. Supports TTL, schema migrations, encryption, compression, signing, debounce/throttle, and history.
Version your data and auto‑apply migration chains (up/down) on structure changes. Set TTL for automatic removal of stale entries on read. Encrypt data via Web Crypto API (AES‑GCM) with PBKDF2 key derivation or a ready‑made CryptoKey, including key rotation.
Enable sync for instant change propagation via BroadcastChannel (with storage event fallback). Optional leader election (navigator.locks) resolves conflicts by last‑write‑wins. Built‑in history (history: n) provides undo/redo without extra code, while debounce/throttle control write frequency.
The Vue plugin sets a global prefix, target, serializer, and error handler. The Nuxt module auto‑imports all composables and makes useCookie SSR‑aware (H3 on the server). The React version uses useSyncExternalStore, sharing one engine with Vue. Separate entry points for Pinia, DevTools, and testing.
Async adapters (including IndexedDB) don’t block rendering; isReady lets you show a skeleton until loading. On the server, an in‑memory fallback is used. Built‑in DevTools inspector shows all instances, their values, TTL, and history, while the timeline logs every change, migration, and error.