Skip to content
Source
Sign inSign up
TanStack/db

eagerly run live queries while collections are loading #658

Mergedsamwillis(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/658/headmerged by samwillis(GitHub profile, opens in a new tab)

Showing 28 changed files with 8 additions and 4 deletions (loading 25).

x
0 of 28 viewed, 28 left
6 additions and 0 deletions.changeset/ready-bats-call.mdAdded
View file
@@ -0,0 +1,6 @@
+---
+"@tanstack/react-db": patch
+"@tanstack/db": patch
+---
+​
+Refactored live queries to execute eagerly during sync. Live queries now materialize their results immediately as data arrives from source collections, even while those collections are still in a "loading" state, rather than waiting for all sources to be "ready" before executing.
1 addition and 1 deletionpackages/angular-db/README.mdModified
View file
@@ -258,7 +258,7 @@
- state: Signal<Map<Key, T>> - Map of results by key, automatically updates
- collection: Signal<Collection> - The underlying collection instance
- status: Signal<CollectionStatus> - Current status ('idle' | 'loading' | 'ready' | 'error' | 'cleaned-up')
-- isLoading: Signal<boolean> - true when status is 'loading' or 'initialCommit'
+- isLoading: Signal<boolean> - true when status is 'loading'
- isReady: Signal<boolean> - true when status is 'ready'
- isIdle: Signal<boolean> - true when status is 'idle'
- isError: Signal<boolean> - true when status is 'error'
1 addition and 3 deletionspackages/angular-db/src/index.tsModified
View file
@@ -184,9 +184,7 @@