Each supported framework comes with its own package. Each framework package re-exports everything from the core @tanstack/db package.
npm install @tanstack/react-db
npm install @tanstack/react-db
TanStack DB is compatible with React v16.8+
npm install @tanstack/solid-db
npm install @tanstack/solid-db
npm install @tanstack/svelte-db
npm install @tanstack/svelte-db
npm install @tanstack/vue-db
npm install @tanstack/vue-db
TanStack DB is compatible with Vue v3.3.0+
npm install @tanstack/angular-db
npm install @tanstack/angular-db
TanStack DB is compatible with Angular v16.0.0+
npm install @tanstack/db
npm install @tanstack/db
Install the the core @tanstack/db package to use DB without a framework.
TanStack DB also provides specialized collection packages for different data sources and storage needs:
For loading data using TanStack Query:
npm install @tanstack/query-db-collection
npm install @tanstack/query-db-collection
Use queryCollectionOptions to fetch data into collections using TanStack Query. This is perfect for REST APIs and existing TanStack Query setups.
Local storage and in-memory collections are included with the framework packages:
Both use localStorageCollectionOptions and localOnlyCollectionOptions respectively, available from your framework package (e.g., @tanstack/react-db).
For real-time sync with ElectricSQL:
npm install @tanstack/electric-db-collection
npm install @tanstack/electric-db-collection
Use electricCollectionOptions to sync data from Postgres databases through ElectricSQL shapes. Ideal for real-time, local-first applications.
For syncing with TrailBase backends:
npm install @tanstack/trailbase-db-collection
npm install @tanstack/trailbase-db-collection
Use trailBaseCollectionOptions to sync records from TrailBase's Record APIs with built-in subscription support.
For offline-first apps and local persistence with RxDB:
npm install @tanstack/rxdb-db-collection
npm install @tanstack/rxdb-db-collection
Use rxdbCollectionOptions to bridge an RxDB collection into TanStack DB. This gives you reactive TanStack DB collections backed by RxDB's powerful local-first database, replication, and conflict handling features.
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.