db-core/persistence
OfficialDurable SQLite-backed persistence for TanStack DB.
System Documentation
What problem does it solve?
SQLite-backed persistence for TanStack DB collections, enabling durable local storage and offline access. persistedCollectionOptions wraps any adapter (Electric, Query, PowerSync, or local-only) to provide a durable local store. Platform adapters: browser OPFS, React Native op-sqlite, Expo sqlite, Electron IPC, Node better-sqlite3, Capacitor, Tauri, Cloudflare Durable Objects. Multi-tab/multi-process coordination via BrowserCollectionCoordinator / ElectronCollectionCoordinator / SingleProcessCoordinator. schemaVersion for migration resets. Local-only mode for offline-first without a server.
Core Features & Use Cases
- Cross-platform persistence adapters and a unified API.
- Durable local storage with multi-tab coordination for offline-first apps.
- SchemaVersioned persistence with local-only and synced configurations.
Quick Start
Create a persisted TanStack DB collection using persistedCollectionOptions with a platform persistence adapter and a coordinator to enable cross-tab durability.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: db-core/persistence Download link: https://github.com/TanStack/db/archive/main.zip#db-core-persistence Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.