- Updated dependencies [
1220d7e]:- @tanstack/query-db-collection@0.2.0
- 0.1 release - first beta 🎉 (#332)
- Updated dependencies [
7d2f4be,f0eda36]:- @tanstack/electric-db-collection@0.1.0
- @tanstack/query-db-collection@0.1.0
- @tanstack/react-db@0.1.0
- @tanstack/trailbase-db-collection@0.1.0
- Updated dependencies []:
- @tanstack/electric-db-collection@0.0.15
- @tanstack/query-db-collection@0.0.15
- @tanstack/react-db@0.0.33
- @tanstack/trailbase-db-collection@0.0.9
- Updated dependencies [
e04bd12]:- @tanstack/query-db-collection@0.0.14
- @tanstack/electric-db-collection@0.0.14
- @tanstack/react-db@0.0.32
- @tanstack/trailbase-db-collection@0.0.8
- Updated dependencies []:
- @tanstack/electric-db-collection@0.0.13
- @tanstack/query-db-collection@0.0.13
- @tanstack/react-db@0.0.31
- @tanstack/trailbase-db-collection@0.0.7
- Updated dependencies []:
- @tanstack/electric-db-collection@0.0.12
- @tanstack/query-db-collection@0.0.12
- @tanstack/react-db@0.0.30
- @tanstack/trailbase-db-collection@0.0.6
- Updated dependencies [
5260ee3]:- @tanstack/trailbase-db-collection@0.0.5
- @tanstack/electric-db-collection@0.0.11
- @tanstack/query-db-collection@0.0.11
- @tanstack/react-db@0.0.29
- Updated dependencies []:
- @tanstack/electric-db-collection@0.0.10
- @tanstack/query-db-collection@0.0.10
- @tanstack/react-db@0.0.28
- @tanstack/trailbase-db-collection@0.0.4
- Updated dependencies []:
- @tanstack/electric-db-collection@0.0.9
- @tanstack/query-db-collection@0.0.9
- @tanstack/react-db@0.0.27
- @tanstack/trailbase-db-collection@0.0.3
-
Add initial release of TrailBase collection for TanStack DB. TrailBase is a blazingly fast, open-source alternative to Firebase built on Rust, SQLite, and V8. It provides type-safe REST and realtime APIs with sub-millisecond latencies, integrated authentication, and flexible access control - all in a single executable. This collection type enables seamless integration with TrailBase backends for high-performance real-time applications. (#228)
-
Updated dependencies [
09c6995]:- @tanstack/trailbase-db-collection@0.0.2
- @tanstack/electric-db-collection@0.0.8
- @tanstack/query-db-collection@0.0.8
- @tanstack/react-db@0.0.26
- Updated dependencies [
20f810e]:- @tanstack/electric-db-collection@0.0.7
- @tanstack/query-db-collection@0.0.7
- @tanstack/react-db@0.0.25
- Updated dependencies []:
- @tanstack/electric-db-collection@0.0.6
- @tanstack/query-db-collection@0.0.6
- @tanstack/react-db@0.0.24
- Updated dependencies []:
- @tanstack/electric-db-collection@0.0.5
- @tanstack/query-db-collection@0.0.5
- @tanstack/react-db@0.0.23
- Updated dependencies []:
- @tanstack/electric-db-collection@0.0.4
- @tanstack/query-db-collection@0.0.4
- @tanstack/react-db@0.0.22
-
Move Collections to their own packages (#252)
- Move local-only and local-storage collections to main
@tanstack/dbpackage - Create new
@tanstack/electric-db-collectionpackage for ElectricSQL integration - Create new
@tanstack/query-db-collectionpackage for TanStack Query integration - Delete
@tanstack/db-collectionspackage (removed from repo) - Update example app and documentation to use new package structure
Why?
- Better separation of concerns
- Independent versioning for each collection type
- Cleaner dependencies (electric collections don't need query deps, etc.)
- Easier to add more collection types moving forward
- Move local-only and local-storage collections to main
-
Updated dependencies [
8e23322]:- @tanstack/electric-db-collection@0.0.3
- @tanstack/query-db-collection@0.0.3
- @tanstack/react-db@0.0.21
- Updated dependencies []:
- @tanstack/db-collections@0.0.24
- @tanstack/react-db@0.0.20
-
- [Breaking change for the Electric Collection]: Use numbers for txid (#245)
- misc type fixes
- Updated dependencies [
9f0b0c2]:- @tanstack/db-collections@0.0.23
- @tanstack/react-db@0.0.19
- Updated dependencies [
266bd29]:- @tanstack/db-collections@0.0.22
- @tanstack/react-db@0.0.18
- Updated dependencies [
1c9e867]:- @tanstack/db-collections@0.0.21
- @tanstack/react-db@0.0.17
- Updated dependencies [
e478d53]:- @tanstack/react-db@0.0.16
- @tanstack/db-collections@0.0.20
- Updated dependencies [
0912a7c]:- @tanstack/db-collections@0.0.19
- @tanstack/react-db@0.0.15
- Updated dependencies [
0dede0a]:- @tanstack/db-collections@0.0.18
- Updated dependencies []:
- @tanstack/db-collections@0.0.17
- @tanstack/react-db@0.0.14
- Updated dependencies [
5cafaf4]:- @tanstack/db-collections@0.0.15
- Updated dependencies [
f6abe9b]:- @tanstack/db-collections@0.0.14
- @tanstack/react-db@0.0.12
-
Export
ElectricCollectionUtils& allow passing generic tocreateTransaction(#179) -
Updated dependencies [
c5489ff]:- @tanstack/db-collections@0.0.13
- @tanstack/react-db@0.0.11
- Updated dependencies []:
- @tanstack/db-collections@0.0.12
- @tanstack/react-db@0.0.10
- Updated dependencies []:
- @tanstack/db-collections@0.0.11
- @tanstack/react-db@0.0.9
-
Type PendingMutation whenever possible (#163)
-
Updated dependencies [
5c538cf,b4602a0]:- @tanstack/db-collections@0.0.10
- @tanstack/react-db@0.0.8
- Updated dependencies [
8b43ad3]:- @tanstack/db-collections@0.0.9
- @tanstack/react-db@0.0.7
-
This change introduces a more streamlined and intuitive API for handling mutations by allowing
onInsert,onUpdate, andonDeletehandlers to be defined directly on the collection configuration. (#156)When
collection.insert(),.update(), or.delete()are called outside of an explicit transaction (i.e., not withinuseOptimisticMutation), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change.Key changes:
@tanstack/db: TheCollectionclass now supportsonInsert,onUpdate, andonDeletein its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined.@tanstack/db-collections:queryCollectionOptionsnow accepts the new handlers and will automaticallyrefetchthe collection's query after a handler successfully completes. This behavior can be disabled if the handler returns{ refetch: false }.electricCollectionOptionsalso accepts the new handlers. These handlers are now required to return an object with a transaction ID ({ txid: string }). The collection then automatically waits for thistxidto be synced back before resolving the mutation, ensuring consistency.
- Breaking Change: Calling
collection.insert(),.update(), or.delete()without being inside auseOptimisticMutationcallback and without a corresponding persistence handler (onInsert, etc.) configured on the collection will now throw an error.
This new pattern simplifies the most common use cases, making the code more declarative. The
useOptimisticMutationhook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections.
The documentation and the React Todo example application have been significantly refactored to adopt the new direct persistence handler pattern as the primary way to perform mutations.
- The
README.mdanddocs/overview.mdfiles have been updated to de-emphasizeuseOptimisticMutationfor simple writes. They now showcase the much simpler API of callingcollection.insert()directly and defining persistence logic in the collection's configuration. - The React Todo example (
examples/react/todo/src/App.tsx) has been completely overhauled. All instances ofuseOptimisticMutationhave been removed and replaced with the newonInsert,onUpdate, andonDeletehandlers, resulting in cleaner and more concise code.
-
Updated dependencies [
80fdac7]:- @tanstack/db-collections@0.0.8
- @tanstack/react-db@0.0.6
-
Collections must have a getId function & use an id for update/delete operators (#134)
-
Switch to Collection options factories instead of extending the Collection class (#145)
This refactors
ElectricCollectionandQueryCollectioninto factory functions (electricCollectionOptionsandqueryCollectionOptions) that return standardCollectionConfigobjects and utility functions. Also adds acreateCollectionfunction to standardize collection instantiation. -
Updated dependencies [
1fbb844,ee5d026,e4feb0c]:- @tanstack/db-collections@0.0.7
- @tanstack/react-db@0.0.5
- Updated dependencies []:
- @tanstack/db-collections@0.0.6
- @tanstack/react-db@0.0.4
- Updated dependencies [
0bbf4c4]:- @tanstack/db-collections@0.0.5
- Updated dependencies [
2d0fcf1]:- @tanstack/db-collections@0.0.4
- Updated dependencies []:
- @tanstack/db-collections@0.0.3
- @tanstack/react-db@0.0.3
- Updated dependencies [
b42479c]:- @tanstack/react-db@0.0.3
- Updated dependencies [
9bb6e89]:- @tanstack/react-db@0.0.2