db-core

Build in-memory typed collections with live queries and optimistic mutations.

3.9k|254|Updated Mar 11, 2025
One-click install
npx skills add https://github.com/TanStack/db --skill db-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-core
Source: https://github.com/TanStack/db/tree/main/packages/db/skills/db-core
Command: npx skills add https://github.com/TanStack/db --skill db-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TanStack DB core provides the fundamental primitives for building typed client-side data stores, including createCollection, various adapter options, and support for live queries and optimistic mutations.

Core Features & Use Cases

  • Core APIs: createCollection, collection-setup patterns, and mutation handlers with optimistic updates.
  • Live queries and incremental dataflow enable reactive UI across frameworks (React, Vue, Svelte, Solid, Angular).
  • Adapter patterns for REST, ElectricSQL, PowerSync, RxDB, TrailBase, and local adapters enable offline-first and hybrid apps.

Quick Start

Create a basic collection with createCollection and queryCollectionOptions to start experimenting with live queries.

Frequently Asked Questions about db-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create in-memory typed collections with live queries?

You create in-memory typed collections with live queries by using the createCollection API and queryCollectionOptions, which establish reactive data stores for frontend applications. This provides incremental dataflow to keep the UI synchronized.

How do optimistic mutations work in a reactive client-side data store?

Optimistic mutations in a reactive client-side data store work by applying deterministic mutation handlers that update the UI immediately before backend confirmation. This ensures a responsive app experience across frameworks like React and Vue.

Can I build offline-first apps using adapter patterns for REST and local storage?

Yes, you can build offline-first and hybrid apps using adapter patterns for REST, ElectricSQL, PowerSync, RxDB, TrailBase, and local adapters. These adapters enable syncing local data stores with various backend services.

What is the best way to manage reactive data stores across multiple frontend frameworks?

The best way to manage reactive data stores across multiple frameworks is using core primitives that support incremental dataflow and live queries. This approach enables seamless reactive UI integration across React, Vue, Svelte, Solid, and Angular.

Do I need a specific backend to use live queries and optimistic mutations?

No, you do not need a specific backend. Live queries and optimistic mutations operate on in-memory collections via adapter patterns, allowing integration with REST, ElectricSQL, PowerSync, RxDB, TrailBase, or local adapters.