Libraries
Framework
Start
Router
Data & State
Query
DB
Store
AI
UI
Table
Charts
Form
Markdown
Highlight
UX
Virtual
Pacer
Hotkeys
Tooling
Devtools
Config
CLI
Intent
Browse all libraries
Blog
Blog & Release Notes
About
YouTube
The official TanStack channel.
Workshops
Live sessions from the maintainers.
Release Notes
The latest releases and changelog.
Community
Channels
Discord
Real-time community support.
GitHub
Source, issues, discussions, and releases.
People & Work
Maintainers
Meet the people maintaining the stack.
Showcase
Projects selected by the TanStack team.
Community projects
Tools
Tools
Application Starter
Alpha
Generate TanStack app starters.
Builder
Alpha
Build and share TanStack projects.
Stats
NPM and ecosystem usage data.
Merch
View all
Support
Support
Support Overview
Find the right support path.
Partners
Companies supporting TanStack.
OSS Sponsors
Sponsors keeping TanStack open source.
Enterprise Support
Private consulting and expert support.
Contact
Get in touch with the TanStack team.
About
Ethos
How we approach open source.
Tenets
The values that shape TanStack libraries.
Design System
Logos, tokens, and UI components.
Search
Ask AI
Libraries
Blog
Community
Tools
Merch
Support
Search
Ask AI
Sign In
Back
TanStack Intent
/
Registry
/
@tanstack/db
Fetching package from npm...
TanStack Intent
/
Registry
/
@tanstack/db
@tanstack/db
0.11.3 (latest) — 7 skills
0.11.1 — 7 skills
0.11.0 — 7 skills
0.9.2 — 7 skills
0.9.0 — 7 skills
0.8.7 — 7 skills
0.8.6 — 7 skills
0.8.5 — 7 skills
0.8.4 — 7 skills
0.8.3 — 7 skills
0.8.2 — 7 skills
0.8.1 — 7 skills
0.8.0 — 7 skills
0.7.2 — 7 skills
0.7.1 — 7 skills
0.7.0 — 7 skills
0.6.17 — 7 skills
0.6.16 — 7 skills
0.6.14 — 7 skills
0.6.13 — 7 skills
0.6.12 — 7 skills
0.6.11 — 7 skills
0.6.10 — 7 skills
0.6.9 — 7 skills
0.6.8 — 7 skills
0.6.7 — 7 skills
0.6.6 — 7 skills
0.6.5 — 7 skills
0.6.4 — 7 skills
0.6.3 — 7 skills
0.6.2 — 7 skills
0.6.1 — 7 skills
0.6.0 — 6 skills
0.5.33 — 6 skills
0.5.32 — 6 skills
0.5.31 — 6 skills
0.5.30 — 0 skills
0.5.29 — 0 skills
0.5.28 — 0 skills
0.5.27 — 0 skills
0.5.26 — 0 skills
0.5.25 — 0 skills
0.5.24 — 0 skills
0.5.23 — 0 skills
0.5.22 — 0 skills
0.5.21 — 0 skills
0.5.20 — 0 skills
0.5.19 — 0 skills
0.5.18 — 0 skills
0.5.17 — 0 skills
0.5.16 — 0 skills
0.5.15 — 0 skills
0.5.14 — 0 skills
0.5.13 — 0 skills
0.5.12 — 0 skills
0.5.11 — 0 skills
0.5.10 — 0 skills
0.5.9 — 0 skills
0.5.8 — 0 skills
0.5.7 — 0 skills
0.5.6 — 0 skills
Copy install prompt
A reactive client store for building super fast apps on sync
Skills
(7)
Skills
All Skills
7
db-core/collection-setup
sub-skill
db-core/custom-adapter
sub-skill
db-core/live-queries
sub-skill
db-core/mutations-optimistic
sub-skill
db-core/persistence
sub-skill
db-core
core
meta-framework
composition
Skills
7
History
db-core/collection-setup
sub-skill
Creating typed collections with createCollection. Adapter selection: queryCollectionOptions (REST/TanStack Query), electricCollectionOptions (ElectricSQL real-time sync), powerSyncCollectionOptions (PowerSync SQLite), rxdbCollectionOptions (RxDB), trailBaseCollectionOptions (TrailBase), localOnlyCollectionOptions, localStorageCollectionOptions. CollectionConfig options: getKey, schema, sync, gcTime, autoIndex (default off), defaultIndexType, syncMode (eager/on-demand, plus progressive for Electric). StandardSchema validation with Zod/Valibot/ArkType. Collection lifecycle (idle/loading/ready/error). Adapter-specific sync patterns including Electric txid tracking, Query direct writes, Query initial data and scoped factories, and PowerSync query-driven sync with onLoad/onLoadSubset hooks.
466 lines
db-core/custom-adapter
sub-skill
Building custom collection adapters for new backends. SyncConfig interface: sync function receiving begin, write, commit, markReady, markError, truncate, metadata primitives and returning cleanup, loadSubset, and optional unloadSubset handlers. ChangeMessage format (insert, update, delete). On-demand LoadSubsetOptions (where, orderBy, limit, offset, cursor). Expression parsing: parseWhereExpression, parseOrderByExpression, extractSimpleComparisons, parseLoadSubsetOptions. Collection options creator pattern. rowUpdateMode (partial vs full). Sync run, subscription lifecycle, and cleanup functions. Persisted sync metadata API (metadata.row and metadata.collection) for storing per-row and per-collection adapter state.
442 lines
db-core/live-queries
sub-skill
Query builder fluent API: from, where, join, leftJoin, rightJoin, innerJoin, fullJoin, select, fn.select, groupBy, having, orderBy, limit, offset, distinct, findOne. Operators: eq, gt, gte, lt, lte, like, ilike, inArray, isNull, isUndefined, and, or, not. Aggregates: count, sum, avg, min, max. String functions: upper, lower, length, concat. Utility: coalesce, caseWhen. Math: add, subtract, multiply, divide. $selected namespace. createLiveQueryCollection. Derived collections. Predicate push-down. Incremental view maintenance via differential dataflow (d2ts). Virtual properties ($hasPendingWrites, $origin, $key, $collectionId). Includes subqueries for hierarchical data. Collection, toArray, materialize, and concat(toArray(...)) include modes. queryOnce for one-shot queries. createEffect for reactive side effects (onEnter, onUpdate, onExit, onBatch).
596 lines
db-core/mutations-optimistic
sub-skill
collection.insert, collection.update (Immer-style draft proxy), collection.delete. createOptimisticAction (onMutate + mutationFn). createPacedMutations with debounceStrategy, throttleStrategy, queueStrategy. createTransaction, getActiveTransaction, ambient transaction context. Transaction lifecycle (pending/persisting/completed/failed). Mutation merging. onInsert/onUpdate/onDelete handlers. PendingMutation type. Transaction.isPersisted.
396 lines
db-core/persistence
sub-skill
SQLite-backed persistence for TanStack DB collections. persistedCollectionOptions wraps any adapter (Electric, Query, PowerSync, or local-only) with durable local storage. Platform adapters: browser (WA-SQLite OPFS), React Native (op-sqlite), Expo (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. Applied transaction log pruning and safe full-reload recovery.
297 lines
db-core
core
TanStack DB core concepts: createCollection with queryCollectionOptions, electricCollectionOptions, powerSyncCollectionOptions, rxdbCollectionOptions, trailBaseCollectionOptions, localOnlyCollectionOptions. Live queries via query builder (from, where, join, select, groupBy, orderBy, limit). Optimistic mutations with draft proxy (collection.insert, collection.update, collection.delete). createOptimisticAction, createTransaction, createPacedMutations. Entry point for all TanStack DB skills.
64 lines
meta-framework
composition
Integrating TanStack DB with meta-frameworks (TanStack Start, Next.js, Remix, Nuxt, SvelteKit). Client-side only: SSR is NOT supported — routes must disable SSR. Preloading eager collections in route loaders with collection.preload(). On-demand Query Collections require preloading the live query because source collection preload is a no-op. Multiple collection preloading with Promise.all. Framework-specific loader APIs.
420 lines