db-core/mutations-optimistic
OfficialOptimistic mutations for TanStack DB.
AuthorTanStack
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Provides a comprehensive pattern for performing optimistic mutations and transactional batching in TanStack DB, enabling responsive UI while ensuring data consistency during backend sync.
Core Features & Use Cases
- insert/update/delete with Immer-style draft proxies and onInsert/onUpdate/onDelete handlers
- createOptimisticAction for intent-based, synchronous optimistic updates plus a backend mutation function
- createPacedMutations for debounced/throttled/queued persistence
- createTransaction for manual batching with ambient transaction context
- Mutation merging, PendingMutation type, and the Transaction lifecycle (pending/persisting/completed/failed)
Quick Start
Create an optimistic mutation by starting a transaction with createTransaction, perform an update on a collection item, and commit to persist the change.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 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/mutations-optimistic Download link: https://github.com/TanStack/db/archive/main.zip#db-core-mutations-optimistic 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.