Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

CHANGELOG.md

1,493 lines67.4 KB

1# @tanstack/react-db
2​
3## 0.5.0
4​
5### Minor Changes
6​
7- Add opt-in network-first initial rendering for eagerly persisted SQLite Collections. `initialRender: { strategy: 'network-first', networkTimeoutMs }` lets React and Solid Suspense render restored rows after the configured deadline (three seconds by default) or a network failure while sync continues. Live-query observers and the Angular, React, Solid, Svelte, and Vue integrations expose `persistedStatus`, `isPersistedReady`, and `persistedError` separately from Collection readiness. ([#1955](https://github.com/TanStack/db/pull/1955))
8​
9### Patch Changes
10​
11- Render completed persisted query data when a client query stream fails during network-first initial rendering. Keep derived-query load failures on the React ErrorBoundary, with errors isolated by client and cleared when the Collection restarts. ([#1960](https://github.com/TanStack/db/pull/1960))
12​
13- Updated dependencies [[`9c62ac3`](https://github.com/TanStack/db/commit/9c62ac3782779dc2a91335dd834ad8eb907db109), [`d5e4732`](https://github.com/TanStack/db/commit/d5e47325a7db907fb2c5f9bb6d1273754bfc4a69), [`0122da8`](https://github.com/TanStack/db/commit/0122da80ae58d8e8e624b460506370a910037c8e), [`f7d96f7`](https://github.com/TanStack/db/commit/f7d96f7e22c8997bca0815521e8e944457c8888a), [`fb509ef`](https://github.com/TanStack/db/commit/fb509efb985f830736389d7ec2b53504c0611395), [`dc4b4e0`](https://github.com/TanStack/db/commit/dc4b4e089a5c5b4b9462fd833ff3c6e0c2f17988), [`f158258`](https://github.com/TanStack/db/commit/f15825858e09914b6b94c4150f77c5137efecdbf), [`c879ba6`](https://github.com/TanStack/db/commit/c879ba6d855914e5c0cac49af7a007eb5cabe7e4), [`b5d92ce`](https://github.com/TanStack/db/commit/b5d92cebd0d951d8a3399618aea4f399915b6ea9)]:
14 - @tanstack/db@0.11.0
15​
16## 0.4.2
17​
18### Patch Changes
19​
20- Preserve pre-created collection row, key, and utility types in React infinite ([#1864](https://github.com/TanStack/db/pull/1864))
21 queries. Align conditional live-query result types with each framework's
22 disabled representation, including nullable collections, disabled statuses,
23 and empty single-result data in the empty-reactive bindings.
24​
25- Retain retry-stable Suspense resources and preserve persisted demand readiness across lifecycle transitions. Avoid redundant Electric refreshes when requesting subset snapshots, and declare React 18 as the minimum supported React version. ([#1860](https://github.com/TanStack/db/pull/1860))
26​
27- Updated dependencies [[`2ad6834`](https://github.com/TanStack/db/commit/2ad6834af4b1ddf9d7c0c9c85e25ea8b1aac44e2), [`b528a61`](https://github.com/TanStack/db/commit/b528a610533a083ec909aeca354ff826d76e37e0), [`84fc44b`](https://github.com/TanStack/db/commit/84fc44b559c94139f28b3cec526ebfe05290b95e), [`9351f46`](https://github.com/TanStack/db/commit/9351f46d68853f4e3f5fa3c7e8c9455e798d0171), [`5108acf`](https://github.com/TanStack/db/commit/5108acf47a0724691a06af8a660014776f9cf716), [`afbeb44`](https://github.com/TanStack/db/commit/afbeb44eef48d92b6e30ae5fd2843b938ee9163c), [`2775082`](https://github.com/TanStack/db/commit/27750825e94acaf221c5a3e7a4ed4a735499e9fa), [`fef53f8`](https://github.com/TanStack/db/commit/fef53f8be7f1cb68f00639a4c3206a6598663de4), [`b44a50a`](https://github.com/TanStack/db/commit/b44a50ad8c1ffeced0749dd773dfdc8ca2db8f0a), [`19dd9a2`](https://github.com/TanStack/db/commit/19dd9a2fa580963f4605d3466674db6ec9d3e002), [`3096b8f`](https://github.com/TanStack/db/commit/3096b8f28b7baaa990ec6113175d684191a21954), [`1ab1cd3`](https://github.com/TanStack/db/commit/1ab1cd35d0549735a864e1cd9260f5b1374d8191), [`e5fe2ea`](https://github.com/TanStack/db/commit/e5fe2ea3597faa257d2c5f8cde6f5d17b8893f0f), [`3eb5b2b`](https://github.com/TanStack/db/commit/3eb5b2b387fed4051744ca4787c499e5f3d2f7b2), [`7c62bf5`](https://github.com/TanStack/db/commit/7c62bf5a159480eee0b3da0b526f943db59446a2), [`63362dc`](https://github.com/TanStack/db/commit/63362dc8cbe7f7a63e5e79fdedaed3c31a7fb7af), [`7f6b643`](https://github.com/TanStack/db/commit/7f6b6438cd3a5b2cfc54ea1d8ad8a2102ea9d699), [`c479fdc`](https://github.com/TanStack/db/commit/c479fdc1c2e09d979842210148a08378fb5d71d7), [`91a2cbf`](https://github.com/TanStack/db/commit/91a2cbfb88fccc5f19f864b69632cfb8e95ed449), [`144c6b1`](https://github.com/TanStack/db/commit/144c6b132f65138d9a12321ef62a286f03551d21), [`5218f0c`](https://github.com/TanStack/db/commit/5218f0c385f61ccfa08ff366fb6f487528702017), [`76d766e`](https://github.com/TanStack/db/commit/76d766e84afbfcde2900a661233dd59e1decd5c2), [`1e54c6a`](https://github.com/TanStack/db/commit/1e54c6a2820ef5f1a87c6f4236311259c041fc24), [`d698b90`](https://github.com/TanStack/db/commit/d698b90579fd5ce3a4bf122ddd30fd4fe9f8d2b6), [`04a1a81`](https://github.com/TanStack/db/commit/04a1a81a0f5bd192d63e2ae5987f48aaf2c2a72a), [`3ad64a4`](https://github.com/TanStack/db/commit/3ad64a42a0088e1272176fb33c953526fed9b868), [`4c5a8de`](https://github.com/TanStack/db/commit/4c5a8de61843d6964a2580aded8a2d027b78e135), [`b72b5d1`](https://github.com/TanStack/db/commit/b72b5d1d2fd01df29373099dd50daf2373e3bb8b), [`fc1adde`](https://github.com/TanStack/db/commit/fc1adde85be0ed3570912688712ccc15875be906), [`2781581`](https://github.com/TanStack/db/commit/27815817c56b3bca1823703dbd9893a0ef86f6d2), [`40a5aea`](https://github.com/TanStack/db/commit/40a5aea5637ce4364ff2fc0bc747100f844bcdc2), [`e16d46c`](https://github.com/TanStack/db/commit/e16d46ce5d10c7f895c8abff86da4925f0eda2d1), [`9cbc885`](https://github.com/TanStack/db/commit/9cbc885e826695c5a33c4684f454ce176ad17d2d), [`23ae52d`](https://github.com/TanStack/db/commit/23ae52d7646593e9ddca9875c3c8e38945f8cdf4), [`7917ef9`](https://github.com/TanStack/db/commit/7917ef990deaf308ce7c4bd469707f01cb34746b), [`1ca838b`](https://github.com/TanStack/db/commit/1ca838b408e588ef52a817196d4ea576b1259008), [`34a999d`](https://github.com/TanStack/db/commit/34a999d7a67f6d2c468a5b6c13a29e2b41861a2b), [`825acc5`](https://github.com/TanStack/db/commit/825acc5ff3b703354088e81b3161d0cc830650cf), [`febd4bc`](https://github.com/TanStack/db/commit/febd4bcc3cafa53d552a7724619a513982789b56), [`b7a7d10`](https://github.com/TanStack/db/commit/b7a7d10d7a045614bd78f482f17a7d1ba568f2b5), [`510cb53`](https://github.com/TanStack/db/commit/510cb538c4706e21a4d70046bf2ab2753f47bfa8), [`efb84d8`](https://github.com/TanStack/db/commit/efb84d800fd162842815e872d088d070db5407e3), [`236d77b`](https://github.com/TanStack/db/commit/236d77bcbe2941816c756ea5f9e8db4c77c333f2), [`71ad428`](https://github.com/TanStack/db/commit/71ad4284922c2355eb723fc5a00f26c72296aef9)]:
28 - @tanstack/db@0.10.0
29​
30## 0.4.1
31​
32### Patch Changes
33​
34- Updated dependencies [[`3c4c35d`](https://github.com/TanStack/db/commit/3c4c35d5868c908979058c4dbeae7c4ac9eab88b)]:
35 - @tanstack/db@0.9.2
36​
37## 0.4.0
38​
39### Minor Changes
40​
41- Remove the ignored `getNextPageParam` option from `useLiveInfiniteQuery` and reject it with a clear error when passed at runtime. Delete this callback from your config; for server pagination, use an on-demand Query Collection whose `queryFn` fulfills `meta.loadSubsetOptions`. Document fixed-server-page loading and clarify that `initialPageParam` labels result pages rather than setting a server cursor. ([#1806](https://github.com/TanStack/db/pull/1806))
42​
43### Patch Changes
44​
45- Updated dependencies [[`a378bd3`](https://github.com/TanStack/db/commit/a378bd3a65f6b9ed0c9a85f793b7dc2e2a59a313), [`ad043b7`](https://github.com/TanStack/db/commit/ad043b7455a5bdc549c36833bc72ddbe9ce8afed), [`025a079`](https://github.com/TanStack/db/commit/025a0799dd7690d892cacff5493b7270c33fdc2c), [`ddc129e`](https://github.com/TanStack/db/commit/ddc129eeab84d7eca4f2972c3dcc37506202a43d)]:
46 - @tanstack/db@0.9.1
47​
48## 0.3.8
49​
50### Patch Changes
51​
52- Updated dependencies [[`cfb01ce`](https://github.com/TanStack/db/commit/cfb01cee34de7d0378e008dc8c01c1df5253c1e2)]:
53 - @tanstack/db@0.9.0
54​
55## 0.3.7
56​
57### Patch Changes
58​
59- Updated dependencies [[`bbc9edf`](https://github.com/TanStack/db/commit/bbc9edf28ef707c8fb3c451fe2c4724039a0037a)]:
60 - @tanstack/db@0.8.7
61​
62## 0.3.6
63​
64### Patch Changes
65​
66- Updated dependencies [[`ae2fe74`](https://github.com/TanStack/db/commit/ae2fe74e4cb4e74500a90034e6db7987bbd90bd8)]:
67 - @tanstack/db@0.8.6
68​
69## 0.3.5
70​
71### Patch Changes
72​
73- Updated dependencies [[`d8defd2`](https://github.com/TanStack/db/commit/d8defd2a8eb96162cbd4e24970d519eac217bb95), [`9ad882f`](https://github.com/TanStack/db/commit/9ad882f71872aa2210b93ea93d084bd08bedb6a4), [`8c5838d`](https://github.com/TanStack/db/commit/8c5838ddd5f08b3c298d4458cae1ce599af80624)]:
74 - @tanstack/db@0.8.5
75​
76## 0.3.4
77​
78### Patch Changes
79​
80- Updated dependencies [[`3131de1`](https://github.com/TanStack/db/commit/3131de14507006f72631947a61e040b1523d417f), [`8f432ba`](https://github.com/TanStack/db/commit/8f432ba226df2a27d67498ddd1df8468f93ff776)]:
81 - @tanstack/db@0.8.4
82​
83## 0.3.3
84​
85### Patch Changes
86​
87- Support disabling live queries declared with the `{ query }` config syntax by returning `undefined` or `null` from the query callback. ([#1757](https://github.com/TanStack/db/pull/1757))
88​
89- Updated dependencies [[`99ba511`](https://github.com/TanStack/db/commit/99ba5113b21fd850a8f3e517e5d44ea42ac9f984), [`43cc741`](https://github.com/TanStack/db/commit/43cc741842ae3689128c308be19069b062642f12)]:
90 - @tanstack/db@0.8.3
91​
92## 0.3.2
93​
94### Patch Changes
95​
96- Updated dependencies [[`c521b5d`](https://github.com/TanStack/db/commit/c521b5d6503d8fdf03574b9f9791143e59d34204)]:
97 - @tanstack/db@0.8.2
98​
99## 0.3.1
100​
101### Patch Changes
102​
103- Updated dependencies [[`5d9335d`](https://github.com/TanStack/db/commit/5d9335d0d42c1cc1ec2b92be8ce40ae8abe42827), [`a20352a`](https://github.com/TanStack/db/commit/a20352a9a7b64c9708bef9a1dfb90c96426b6730)]:
104 - @tanstack/db@0.8.1
105​
106## 0.3.0
107​
108### Minor Changes
109​
110- Add SSR through request-scoped `DbClient` instances, collection descriptors, ([#1564](https://github.com/TanStack/db/pull/1564))
111 explicit collection-row hydration, live-query result snapshots, adapter sync
112 metadata, and React and Svelte descriptor resolution.
113​
114 React live queries now derive identity from structured query IR. Opaque queries
115 can provide `queryKey`; legacy dependency arrays and unkeyed opaque queries keep
116 working with development warnings until 1.0.
117​
118 Add TanStack Router integration that streams live queries discovered during a
119 Suspense render as pending promises which resolve to ordered result snapshots.
120 The browser starts normal source sync and atomically replaces the snapshot when
121 its live result is ready.
122​
123### Patch Changes
124​
125- Updated dependencies [[`4b9e8cd`](https://github.com/TanStack/db/commit/4b9e8cdf79551734cf526e6fa4bbdba42ec94575)]:
126 - @tanstack/db@0.8.0
127​
128## 0.2.1
129​
130### Patch Changes
131​
132- Update agent skills to match current APIs and behavior. ([#1696](https://github.com/TanStack/db/pull/1696))
133​
134- Updated dependencies [[`5f63996`](https://github.com/TanStack/db/commit/5f63996b0febd4775fb641f50975f8f0d442dc00)]:
135 - @tanstack/db@0.7.2
136​
137## 0.2.0
138​
139### Minor Changes
140​
141- Add `useLiveInfiniteQuery` as a Vue binding over the shared live-query window controller. Align infinite-query behavior across React, Vue, and Svelte, including awaitable page fetches, safe page sizes, reactive page-depth preservation, ordered collection validation, shared input resolution, and shared-window cleanup. ([#1724](https://github.com/TanStack/db/pull/1724))
142​
143### Patch Changes
144​
145- Updated dependencies [[`424382b`](https://github.com/TanStack/db/commit/424382b3a80c6b3556701b433c26c8a60fc8d1af)]:
146 - @tanstack/db@0.7.1
147​
148## 0.1.96
149​
150### Patch Changes
151​
152- Add an internal shared live-query observer and migrate all five framework adapters to it ([#1642](https://github.com/TanStack/db/pull/1642))
153​
154 Introduces `createLiveQueryObserver` in `@tanstack/db`: given a resolved live-query collection (or `null` for a disabled query) it owns the subscription lifecycle every adapter used to re-implement — change and status subscriptions, a snapshot with stable identity per state revision for wholesale consumers, and delivery of the raw `ChangeMessage[]` for granular consumers. React, Vue, Svelte, Solid, and Angular's live-query hooks now materialize from the observer instead of their own hand-rolled subscription/status/snapshot machinery, keeping each adapter's native reactivity and each adapter's data-loading policy (wholesale adapters subscribe without initial state; granular adapters seed from it).
155​
156 The observer is an **internal, unstable contract** for TanStack DB's official adapters — it is exported so the adapter packages can consume it, but it is not a public extension point yet and its API may change in any release.
157​
158 The migration also fixes several live-query lifecycle defects: status-only transitions (`error`, `cleaned-up`) now reach mounted consumers; snapshot identity is stable across unsubscribe/resubscribe and stays fresh while detached; dispatch is FIFO and non-reentrant with subscriptions identified by record rather than callback; disposing during the synchronous initial replay no longer leaks the collection subscription; subscribing after dispose throws instead of registering a dead listener; Solid guards its async resource continuations against superseded collections; and constructing an observer no longer activates sync. Observers activate on their first committed subscription unless an adapter has already started a pre-created collection supplied directly or returned from a callback.
159​
160- Add the unstable, internal `createLiveQueryWindowController` primitive for ([#1675](https://github.com/TanStack/db/pull/1675))
161 forward pagination. It coordinates collection-scoped window leases, commits
162 pages only after subset loads succeed, restores windows after failures and
163 cleanup, and lets React's `useLiveInfiniteQuery` become a thin binding without
164 changing its public API or resetting pages for structurally equal dependencies.
165- Updated dependencies [[`ad88d07`](https://github.com/TanStack/db/commit/ad88d0751db9723dfb9f164ebfcef88d52b6efa3), [`7e7abda`](https://github.com/TanStack/db/commit/7e7abda73a7ab313f9ec6a413fad00f300e79fb3), [`dc53f0e`](https://github.com/TanStack/db/commit/dc53f0ecbc38e173af68d829ff2de97531494722)]:
166 - @tanstack/db@0.7.0
167​
168## 0.1.95
169​
170### Patch Changes
171​
172- Updated dependencies [[`8ee783d`](https://github.com/TanStack/db/commit/8ee783d7aed9bd5585c182607581305374b8904f)]:
173 - @tanstack/db@0.6.17
174​
175## 0.1.94
176​
177### Patch Changes
178​
179- Updated dependencies [[`8258d09`](https://github.com/TanStack/db/commit/8258d0955ab47c8510bd49ea59bcdbefd2ae054d), [`286964d`](https://github.com/TanStack/db/commit/286964d72612b59e3e427baabd9870f5a71a4281)]:
180 - @tanstack/db@0.6.16
181​
182## 0.1.93
183​
184### Patch Changes
185​
186- Extract shared live-query adapter helpers into `@tanstack/db` ([#1641](https://github.com/TanStack/db/pull/1641))
187​
188 Adds `isCollection`, `isSingleResultCollection`, and `getLiveQueryStatusFlags` to `@tanstack/db` and migrates all five framework adapters to use them. `isCollection` replaces the per-adapter duck-typing and Solid's `instanceof CollectionImpl` with one structural, multi-realm-safe guard (the `instanceof` form gave false negatives across dual-package boundaries). No behavior change; internal deduplication only.
189​
190- Updated dependencies [[`eabcea7`](https://github.com/TanStack/db/commit/eabcea743fdfa045a2db01e12bef87403613102a), [`6d4c096`](https://github.com/TanStack/db/commit/6d4c096395b7ff3f428122ea8842bbead551a8c9)]:
191 - @tanstack/db@0.6.15
192​
193## 0.1.92
194​
195### Patch Changes
196​
197- Updated dependencies [[`397e12a`](https://github.com/TanStack/db/commit/397e12a1224ad563e20a331eebcbe904cd4af948)]:
198 - @tanstack/db@0.6.14
199​
200## 0.1.91
201​
202### Patch Changes
203​
204- Updated dependencies [[`99e9afe`](https://github.com/TanStack/db/commit/99e9afed46ab4083d66609a3e37ee44103c2177f), [`816b667`](https://github.com/TanStack/db/commit/816b6671c2cc9806715f6e6ed4410b3f4efb5afb)]:
205 - @tanstack/db@0.6.13
206​
207## 0.1.90
208​
209### Patch Changes
210​
211- Updated dependencies [[`2b27dd1`](https://github.com/TanStack/db/commit/2b27dd1448da71c78a48e2390cb71b0ada1b1488)]:
212 - @tanstack/db@0.6.12
213​
214## 0.1.89
215​
216### Patch Changes
217​
218- Updated dependencies [[`d79b0cd`](https://github.com/TanStack/db/commit/d79b0cd3fd20c1f7e2525e90121752fb6bee314c), [`36fb29a`](https://github.com/TanStack/db/commit/36fb29ad7e906d39b6afdba2fd31e369c601bbb0), [`d79b0cd`](https://github.com/TanStack/db/commit/d79b0cd3fd20c1f7e2525e90121752fb6bee314c), [`ac09b11`](https://github.com/TanStack/db/commit/ac09b1177a100eafa85cba3cd09dd1f53f933ded)]:
219 - @tanstack/db@0.6.11
220​
221## 0.1.88
222​
223### Patch Changes
224​
225- Updated dependencies [[`307fdf8`](https://github.com/TanStack/db/commit/307fdf80f522a39a50e316316b3b75ba27fd5e84)]:
226 - @tanstack/db@0.6.10
227​
228## 0.1.87
229​
230### Patch Changes
231​
232- Updated dependencies [[`2147345`](https://github.com/TanStack/db/commit/2147345236ceee6e73d9fc6c0cdc2385833199fc), [`00389a4`](https://github.com/TanStack/db/commit/00389a47b258ad58fc3a03c5cc6f66957b9bd2d1)]:
233 - @tanstack/db@0.6.9
234​
235## 0.1.86
236​
237### Patch Changes
238​
239- Updated dependencies [[`3827b62`](https://github.com/TanStack/db/commit/3827b62604bbfc970d80b57479c8da063d78e69d)]:
240 - @tanstack/db@0.6.8
241​
242## 0.1.85
243​
244### Patch Changes
245​
246- Updated dependencies [[`ec59984`](https://github.com/TanStack/db/commit/ec59984dcd8610ad9651c2d32e1361143d44d3c9), [`6238a2d`](https://github.com/TanStack/db/commit/6238a2d80caf4d1cdecaf889fb66bd6ebcc7386a)]:
247 - @tanstack/db@0.6.7
248​
249## 0.1.84
250​
251### Patch Changes
252​
253- Updated dependencies [[`4e9ab39`](https://github.com/TanStack/db/commit/4e9ab39241aae3ba17c8bddf744d566de411f9aa)]:
254 - @tanstack/db@0.6.6
255​
256## 0.1.83
257​
258### Patch Changes
259​
260- Updated dependencies [[`232f228`](https://github.com/TanStack/db/commit/232f22845ddfe179a803a241f95a3375ae63a1fb), [`232f228`](https://github.com/TanStack/db/commit/232f22845ddfe179a803a241f95a3375ae63a1fb)]:
261 - @tanstack/db@0.6.5
262​
263## 0.1.82
264​
265### Patch Changes
266​
267- Add includes (hierarchical data) documentation to all framework SKILL.md files and fix inaccurate toArray scalar select constraint in db-core/live-queries skill. ([#1361](https://github.com/TanStack/db/pull/1361))
268​
269- Updated dependencies [[`1e69dd6`](https://github.com/TanStack/db/commit/1e69dd6fac7c9d8d7314af5ce18c33f2006c96b4)]:
270 - @tanstack/db@0.6.4
271​
272## 0.1.81
273​
274### Patch Changes
275​
276- Updated dependencies [[`e29aab3`](https://github.com/TanStack/db/commit/e29aab3ece4420c6959202294777daa606c4b9e4), [`f4a9bd2`](https://github.com/TanStack/db/commit/f4a9bd28c613dc4757f279f292c9276f6a8e012e)]:
277 - @tanstack/db@0.6.3
278​
279## 0.1.80
280​
281### Patch Changes
282​
283- Fix stale status mismatch in useLiveSuspenseQuery causing infinite suspense fallback. ([#1427](https://github.com/TanStack/db/pull/1427))
284​
285- Updated dependencies [[`3fe689a`](https://github.com/TanStack/db/commit/3fe689a4444d53a075a0dbe6e2649f8852137fc8), [`c314c36`](https://github.com/TanStack/db/commit/c314c36b8bd02f8be86865c13f31f817ce21dc66)]:
286 - @tanstack/db@0.6.2
287​
288## 0.1.79
289​
290### Patch Changes
291​
292- Update all SKILL.md files to v0.6.0 with new documentation for persistence, virtual properties, queryOnce, createEffect, includes, indexing, and sync metadata. Add tanstack-intent keyword to all packages with skills. ([#1421](https://github.com/TanStack/db/pull/1421))
293​
294- Updated dependencies [[`8b7fb1a`](https://github.com/TanStack/db/commit/8b7fb1a18522b8d1c2adb46f5917305c7d99fc4a)]:
295 - @tanstack/db@0.6.1
296​
297## 0.1.78
298​
299### Patch Changes
300​
301- Update dependencies across workspace to resolve version mismatches: `@electric-sql/client` ^1.5.13, `@tanstack/store` ^0.9.2, `pg` ^8.20.0. Adapt subscription cleanup to `@tanstack/store` 0.9.x API which returns `Subscription` objects instead of unsubscribe functions. ([#1381](https://github.com/TanStack/db/pull/1381))
302​
303- Updated dependencies [[`f60384b`](https://github.com/TanStack/db/commit/f60384b0fbde019865cbac5a7af341ff8a46d483), [`b8abc02`](https://github.com/TanStack/db/commit/b8abc0230096900746f92c51496489460b4d75e1), [`09c7afc`](https://github.com/TanStack/db/commit/09c7afc47a5ef3f3415ae601b6b00155ab64650b), [`bb09eb1`](https://github.com/TanStack/db/commit/bb09eb1eecbf680bb95a0bb08639f337e9982043), [`179d666`](https://github.com/TanStack/db/commit/179d66685449bcdf9f785c8765bc57cc19c2f7bd), [`43ecbfa`](https://github.com/TanStack/db/commit/43ecbfae5be5e59ffdce6c545d90ca5a810159e6), [`055fd94`](https://github.com/TanStack/db/commit/055fd94bd4654d27d5366af12a90da4c0e670fc0), [`055fd94`](https://github.com/TanStack/db/commit/055fd94bd4654d27d5366af12a90da4c0e670fc0), [`055fd94`](https://github.com/TanStack/db/commit/055fd94bd4654d27d5366af12a90da4c0e670fc0), [`055fd94`](https://github.com/TanStack/db/commit/055fd94bd4654d27d5366af12a90da4c0e670fc0), [`85f5435`](https://github.com/TanStack/db/commit/85f54355a426baefc88ccc55179e0cfcb4dac168), [`b65d8f7`](https://github.com/TanStack/db/commit/b65d8f767dafb1aeede26766c644f9ef0694f20c), [`e0df07e`](https://github.com/TanStack/db/commit/e0df07e1eb2eefbc829407f337cee1d443a7e9b6), [`9952921`](https://github.com/TanStack/db/commit/9952921e02ed8bca5653f0afa64862fc22ffbf9d), [`d351c67`](https://github.com/TanStack/db/commit/d351c677d687e667450138f66ab3bd0e11e7e347)]:
304 - @tanstack/db@0.6.0
305​
306## 0.1.77
307​
308### Patch Changes
309​
310- Add `createEffect` API for reactive delta-driven effects and `useLiveQueryEffect` React hook. ([#1221](https://github.com/TanStack/db/pull/1221))
311​
312 `createEffect` attaches callbacks to a live query's delta stream — firing `onEnter`, `onExit`, and `onUpdate` for row-level query-result transitions and `onBatch` for the full delta batch from each graph run — without materialising the full result set. Supports `skipInitial`, `orderBy` + `limit` (top-K window), joins, lazy loading, transaction coalescing, async disposal with `AbortSignal`, and `onSourceError` / `onError` callbacks.
313​
314 `useLiveQueryEffect` is the React hook wrapper that manages the effect lifecycle (create on mount, dispose on unmount, recreate on dependency change).
315​
316- Updated dependencies [[`c3e6a96`](https://github.com/TanStack/db/commit/c3e6a9654004ce53d429e0ec995738078ab93870)]:
317 - @tanstack/db@0.5.33
318​
319## 0.1.76
320​
321### Patch Changes
322​
323- Updated dependencies [[`eeb5321`](https://github.com/TanStack/db/commit/eeb5321c578ffa2fbdfb7b0b3d64f579d1933522), [`495abc2`](https://github.com/TanStack/db/commit/495abc29fe8c088783b43402c7eeed35566d8524), [`a55e2bf`](https://github.com/TanStack/db/commit/a55e2bf54dbe78128adf5ce26d524a13dedf8145), [`41c0ea2`](https://github.com/TanStack/db/commit/41c0ea2d956f9de37d0216af371f58a461be6f1f)]:
324 - @tanstack/db@0.5.32
325​
326## 0.1.75
327​
328### Patch Changes
329​
330- Add Intent agent skills (SKILL.md files) to guide AI coding agents. Include skills for core DB concepts, all 5 framework bindings, meta-framework integration, and offline transactions. Also add `export * from '@tanstack/db'` to angular-db for consistency with other framework packages. ([#1330](https://github.com/TanStack/db/pull/1330))
331​
332- fix(react-db): make getNextPageParam optional in useLiveInfiniteQuery ([#1268](https://github.com/TanStack/db/pull/1268))
333​
334- fix(react-db): handle rejected/stale setWindow promises in useLiveInfiniteQuery ([#1269](https://github.com/TanStack/db/pull/1269))
335​
336- Updated dependencies [[`bf1d078`](https://github.com/TanStack/db/commit/bf1d078627de150bfca02e2ae2ad8b0289c19b37)]:
337 - @tanstack/db@0.5.31
338​
339## 0.1.74
340​
341### Patch Changes
342​
343- Updated dependencies [[`e9d0fd8`](https://github.com/TanStack/db/commit/e9d0fd8f0db18a7dc8a0f2b3eacd50a94f6258f7)]:
344 - @tanstack/db@0.5.30
345​
346## 0.1.73
347​
348### Patch Changes
349​
350- Updated dependencies [[`77b815e`](https://github.com/TanStack/db/commit/77b815ee52e91ca8d03110a551a4cb8bab4f2daa), [`ac4ce67`](https://github.com/TanStack/db/commit/ac4ce6790e906f5cfb086b063c8d7daa7681ceb9)]:
351 - @tanstack/db@0.5.29
352​
353## 0.1.72
354​
355### Patch Changes
356​
357- Updated dependencies [[`46450e7`](https://github.com/TanStack/db/commit/46450e73bf78dbdcbef1fb46cb90c6a86b10f6c8)]:
358 - @tanstack/db@0.5.28
359​
360## 0.1.71
361​
362### Patch Changes
363​
364- Updated dependencies [[`802550f`](https://github.com/TanStack/db/commit/802550f3c517b8decac273edf9a4a6074fb3526b), [`dc41d7d`](https://github.com/TanStack/db/commit/dc41d7dacc4a70cb62462633a375de823f01b280), [`4ff3da5`](https://github.com/TanStack/db/commit/4ff3da57e095dc17d8585585d7678b9538cf7602), [`2223cd6`](https://github.com/TanStack/db/commit/2223cd6b51ce37f21983302804a75af28b47f2fe)]:
365 - @tanstack/db@0.5.27
366​
367## 0.1.70
368​
369### Patch Changes
370​
371- Fix `useLiveInfiniteQuery` peek-ahead detection for `hasNextPage`. The initial query now correctly requests `pageSize + 1` items to detect whether additional pages exist, matching the behavior of subsequent page loads. ([#1209](https://github.com/TanStack/db/pull/1209))
372​
373 Fix async on-demand pagination by ensuring the graph callback fires at least once even when there is no pending graph work, so that `loadMoreIfNeeded` is triggered after `setWindow()` increases the limit.
374​
375- Updated dependencies [[`85c373e`](https://github.com/TanStack/db/commit/85c373ef892e4080fe86b26e2fcb762181545e3c), [`9184dcc`](https://github.com/TanStack/db/commit/9184dcce62019ea870f968f4a4a5c2428291214d), [`83d5ac8`](https://github.com/TanStack/db/commit/83d5ac82983fb6c244c53d349c83845969473a9b)]:
376 - @tanstack/db@0.5.26
377​
378## 0.1.69
379​
380### Patch Changes
381​
382- Updated dependencies [[`43c7c9d`](https://github.com/TanStack/db/commit/43c7c9d5f2b47366a58f87470ac5dca95020ac57), [`284ebcc`](https://github.com/TanStack/db/commit/284ebcc8346bd237c3381de766995b8bda35009a)]:
383 - @tanstack/db@0.5.25
384​
385## 0.1.68
386​
387### Patch Changes
388​
389- Updated dependencies [[`7099459`](https://github.com/TanStack/db/commit/7099459291810b237a9fb24bbfe6e543852a2ab2)]:
390 - @tanstack/db@0.5.24
391​
392## 0.1.67
393​
394### Patch Changes
395​
396- Updated dependencies [[`05130f2`](https://github.com/TanStack/db/commit/05130f2420eb682f11f099310a0af87afa3f35fe)]:
397 - @tanstack/db@0.5.23
398​
399## 0.1.66
400​
401### Patch Changes
402​
403- Updated dependencies [[`f9b741e`](https://github.com/TanStack/db/commit/f9b741e9fb636be1c9f1502b7e28fe691bae2480)]:
404 - @tanstack/db@0.5.22
405​
406## 0.1.65
407​
408### Patch Changes
409​
410- Updated dependencies [[`6745ed0`](https://github.com/TanStack/db/commit/6745ed003dc25cfd6fa0f7e60f708205a6069ff2), [`1b22e40`](https://github.com/TanStack/db/commit/1b22e40c56323cfa5e7f759272fed53320aa32f7), [`7a2cacd`](https://github.com/TanStack/db/commit/7a2cacd7a426530cb77844a8c2680f6b06e9ce2f), [`bdf9405`](https://github.com/TanStack/db/commit/bdf94059e7ab98b5181e0df7d8d25cd1dbb5ae58)]:
411 - @tanstack/db@0.5.21
412​
413## 0.1.64
414​
415### Patch Changes
416​
417- Updated dependencies []:
418 - @tanstack/db@0.5.20
419​
420## 0.1.63
421​
422### Patch Changes
423​
424- Updated dependencies [[`29033b8`](https://github.com/TanStack/db/commit/29033b8f55b0ba5721371ad761037ec813440aa7), [`888ad6a`](https://github.com/TanStack/db/commit/888ad6afe5932b0467320c04fbd4583469cb9c47)]:
425 - @tanstack/db@0.5.19
426​
427## 0.1.62
428​
429### Patch Changes
430​
431- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
432 - @tanstack/db@0.5.18
433​
434## 0.1.61
435​
436### Patch Changes
437​
438- Improve runtime error message and documentation when `useLiveSuspenseQuery` receives `undefined` from query callback. ([#860](https://github.com/TanStack/db/pull/860))
439​
440 Following TanStack Query's `useSuspenseQuery` design, `useLiveSuspenseQuery` intentionally does not support disabled queries (when callback returns `undefined` or `null`). This maintains the type guarantee that `data` is always `T` (not `T | undefined`), which is a core benefit of using Suspense.
441​
442 **What changed:**
443 1. **Improved runtime error message** with clear guidance:
444​
445 ```
446 useLiveSuspenseQuery does not support disabled queries (callback returned undefined/null).
447 The Suspense pattern requires data to always be defined (T, not T | undefined).
448 Solutions:
449 1) Use conditional rendering - don't render the component until the condition is met.
450 2) Use useLiveQuery instead, which supports disabled queries with the 'isEnabled' flag.
451 ```
452​
453 2. **Enhanced JSDoc documentation** with detailed `@remarks` section explaining the design decision, showing both incorrect (❌) and correct (✅) patterns
454​
455 **Why this matters:**
456​
457 ```typescript
458 // ❌ This pattern doesn't work with Suspense queries:
459 const { data } = useLiveSuspenseQuery(
460 (q) => userId
461 ? q.from({ users }).where(({ users }) => eq(users.id, userId)).findOne()
462 : undefined,
463 [userId]
464 )
465​
466 // ✅ Instead, use conditional rendering:
467 function UserProfile({ userId }: { userId: string }) {
468 const { data } = useLiveSuspenseQuery(
469 (q) => q.from({ users }).where(({ users }) => eq(users.id, userId)).findOne(),
470 [userId]
471 )
472 return <div>{data.name}</div> // data is guaranteed non-undefined
473 }
474​
475 function App({ userId }: { userId?: string }) {
476 if (!userId) return <div>No user selected</div>
477 return <UserProfile userId={userId} />
478 }
479​
480 // ✅ Or use useLiveQuery for conditional queries:
481 const { data, isEnabled } = useLiveQuery(
482 (q) => userId
483 ? q.from({ users }).where(({ users }) => eq(users.id, userId)).findOne()
484 : undefined,
485 [userId]
486 )
487 ```
488​
489 This aligns with TanStack Query's philosophy where Suspense queries prioritize type safety and proper component composition over flexibility.
490​
491- Updated dependencies [[`f795a67`](https://github.com/TanStack/db/commit/f795a674f21659ef46ff370d4f3b9903a596bcaf), [`d542667`](https://github.com/TanStack/db/commit/d542667a3440415d8e6cbb449b20abd3cbd6855c), [`6503c09`](https://github.com/TanStack/db/commit/6503c091a259208331f471dca29abf086e881147), [`b1cc4a7`](https://github.com/TanStack/db/commit/b1cc4a7e018ffb6804ae7f1c99e9c6eb4bb22812)]:
492 - @tanstack/db@0.5.17
493​
494## 0.1.60
495​
496### Patch Changes
497​
498- Updated dependencies [[`41308b8`](https://github.com/TanStack/db/commit/41308b8ee914aa467e22842cd454f06d1a60032e)]:
499 - @tanstack/db@0.5.16
500​
501## 0.1.59
502​
503### Patch Changes
504​
505- Updated dependencies [[`32ec4d8`](https://github.com/TanStack/db/commit/32ec4d8478cca96f76f3a49efc259c95b85baa40)]:
506 - @tanstack/db@0.5.15
507​
508## 0.1.58
509​
510### Patch Changes
511​
512- Updated dependencies [[`26ed0aa`](https://github.com/TanStack/db/commit/26ed0aad2def60e652508a99b2e980e73f70148e)]:
513 - @tanstack/db@0.5.14
514​
515## 0.1.57
516​
517### Patch Changes
518​
519- Updated dependencies [[`8ed7725`](https://github.com/TanStack/db/commit/8ed7725514a6a501482a391162f7792aa8b371e5), [`01452bf`](https://github.com/TanStack/db/commit/01452bfd0d00da8bd52941a4954af73749473651)]:
520 - @tanstack/db@0.5.13
521​
522## 0.1.56
523​
524### Patch Changes
525​
526- Updated dependencies [[`b3b1940`](https://github.com/TanStack/db/commit/b3b194000d8efcc2c6cc45a663029dadc26f13f0), [`09da081`](https://github.com/TanStack/db/commit/09da081b420fc915d7f0dc566c6cdbbc78582435), [`86ad40c`](https://github.com/TanStack/db/commit/86ad40c6bc37b2f5d4ad24d06f72168ca4b96161)]:
527 - @tanstack/db@0.5.12
528​
529## 0.1.55
530​
531### Patch Changes
532​
533- Fixed `isReady` to return `true` for disabled queries in `useLiveQuery`/`injectLiveQuery` across all framework packages. When a query function returns `null` or `undefined` (disabling the query), there's no async operation to wait for, so the hook should be considered "ready" immediately. ([#886](https://github.com/TanStack/db/pull/886))
534​
535 Additionally, all frameworks now have proper TypeScript overloads that explicitly support returning `undefined | null` from query functions, making the disabled query pattern type-safe.
536​
537 This fixes the common pattern where users conditionally enable queries and don't want to show loading states when the query is disabled.
538​
539- Updated dependencies [[`c4b9399`](https://github.com/TanStack/db/commit/c4b93997432743d974749683059bf68a082d3e5b), [`a1a484e`](https://github.com/TanStack/db/commit/a1a484ec4d2331d702ab9c4b7e5b02622c76b3dd)]:
540 - @tanstack/db@0.5.11
541​
542## 0.1.54
543​
544### Patch Changes
545​
546- Updated dependencies [[`1d19d22`](https://github.com/TanStack/db/commit/1d19d2219cbbaef6483845df1c3b078077e4e3bd), [`b3e4e80`](https://github.com/TanStack/db/commit/b3e4e80c4b73d96c15391ac25efb518c7ae7ccbb)]:
547 - @tanstack/db@0.5.10
548​
549## 0.1.53
550​
551### Patch Changes
552​
553- Updated dependencies [[`5f474f1`](https://github.com/TanStack/db/commit/5f474f1eabd57e144ba05b0f33d848f7efc8fb07)]:
554 - @tanstack/db@0.5.9
555​
556## 0.1.52
557​
558### Patch Changes
559​
560- Updated dependencies [[`954c8fe`](https://github.com/TanStack/db/commit/954c8fed5ed92a348ac8b6d8333bc69c955f4f60), [`51c73aa`](https://github.com/TanStack/db/commit/51c73aaa2b27b27966edb98fb6664beb44eac1ac)]:
561 - @tanstack/db@0.5.8
562​
563## 0.1.51
564​
565### Patch Changes
566​
567- Updated dependencies [[`295cb45`](https://github.com/TanStack/db/commit/295cb45797572b232650eddd3d62ffa937fa2fd7)]:
568 - @tanstack/db@0.5.7
569​
570## 0.1.50
571​
572### Patch Changes
573​
574- Updated dependencies [[`c8a2c16`](https://github.com/TanStack/db/commit/c8a2c16aa528427d5ddd55cda4ee59a5cb369b5f)]:
575 - @tanstack/db@0.5.6
576​
577## 0.1.49
578​
579### Patch Changes
580​
581- Updated dependencies [[`077fc1a`](https://github.com/TanStack/db/commit/077fc1a418ca090d7533115888c09f3f609e36b2)]:
582 - @tanstack/db@0.5.5
583​
584## 0.1.48
585​
586### Patch Changes
587​
588- Updated dependencies [[`acb3e4f`](https://github.com/TanStack/db/commit/acb3e4f1441e6872ca577e74d92ae2d77deb5938), [`464805d`](https://github.com/TanStack/db/commit/464805d96bad6d0fd741e48fbfc98e90dc58bebe), [`2c2e4db`](https://github.com/TanStack/db/commit/2c2e4dbd781d278347d73373f66d3c51c6388116), [`15c772f`](https://github.com/TanStack/db/commit/15c772f5e42e49000a2d775fd8e4cfda3418243f)]:
589 - @tanstack/db@0.5.4
590​
591## 0.1.47
592​
593### Patch Changes
594​
595- Updated dependencies [[`846a830`](https://github.com/TanStack/db/commit/846a8309a243197245f4400a5d53cef5cec6d5d9), [`8e26dcf`](https://github.com/TanStack/db/commit/8e26dcfde600e4a18cd51fbe524560d60ab98d70)]:
596 - @tanstack/db@0.5.3
597​
598## 0.1.46
599​
600### Patch Changes
601​
602- Updated dependencies [[`99a3716`](https://github.com/TanStack/db/commit/99a371630b9f4632db86c43357c64701ecb53b0e)]:
603 - @tanstack/db@0.5.2
604​
605## 0.1.45
606​
607### Patch Changes
608​
609- Updated dependencies [[`a83a818`](https://github.com/TanStack/db/commit/a83a8189514d22ca2fcdf34b9cb97206d3c03c38)]:
610 - @tanstack/db@0.5.1
611​
612## 0.1.44
613​
614### Patch Changes
615​
616- Updated dependencies [[`243a35a`](https://github.com/TanStack/db/commit/243a35a632ee0aca20c3ee12ee2ac2929d8be11d), [`f9d11fc`](https://github.com/TanStack/db/commit/f9d11fc3d7297c61feb3c6876cb2f436edbb5b34), [`7aedf12`](https://github.com/TanStack/db/commit/7aedf12996a67ef64010bca0d78d51c919dd384f), [`28f81b5`](https://github.com/TanStack/db/commit/28f81b5165d0a9566f99c2b6cf0ad09533e1a2cb), [`28f81b5`](https://github.com/TanStack/db/commit/28f81b5165d0a9566f99c2b6cf0ad09533e1a2cb), [`f6ac7ea`](https://github.com/TanStack/db/commit/f6ac7eac50ae1334ddb173786a68c9fc732848f9), [`01093a7`](https://github.com/TanStack/db/commit/01093a762cf2f5f308edec7f466d1c3dabb5ea9f)]:
617 - @tanstack/db@0.5.0
618​
619## 0.1.43
620​
621### Patch Changes
622​
623- Updated dependencies [[`6c55e16`](https://github.com/TanStack/db/commit/6c55e16a2545b479b1d47f548b6846d362573d45), [`7805afb`](https://github.com/TanStack/db/commit/7805afb7286b680168b336e77dd4de7dd1b6f06a), [`1367756`](https://github.com/TanStack/db/commit/1367756d0a68447405c5f5c1a3cca30ab0558d74)]:
624 - @tanstack/db@0.4.20
625​
626## 0.1.42
627​
628### Patch Changes
629​
630- Updated dependencies [[`75470a8`](https://github.com/TanStack/db/commit/75470a8297f316b4817601b2ea92cb9b21cc7829)]:
631 - @tanstack/db@0.4.19
632​
633## 0.1.41
634​
635### Patch Changes
636​
637- Add `useLiveSuspenseQuery` hook for React Suspense support ([#697](https://github.com/TanStack/db/pull/697))
638​
639 Introduces a new `useLiveSuspenseQuery` hook that integrates with React Suspense and Error Boundaries, following TanStack Query's `useSuspenseQuery` pattern.
640​
641 **Key features:**
642 - React 18+ compatible using the throw promise pattern
643 - Type-safe API with guaranteed data (never undefined)
644 - Automatic error handling via Error Boundaries
645 - Reactive updates after initial load via useSyncExternalStore
646 - Support for dependency-based re-suspension
647 - Works with query functions, config objects, and pre-created collections
648​
649 **Example usage:**
650​
651 ```tsx
652 import { Suspense } from 'react'
653 import { useLiveSuspenseQuery } from '@tanstack/react-db'
654​
655 function TodoList() {
656 // Data is guaranteed to be defined - no isLoading needed
657 const { data } = useLiveSuspenseQuery((q) =>
658 q
659 .from({ todos: todosCollection })
660 .where(({ todos }) => eq(todos.completed, false)),
661 )
662​
663 return (
664 <ul>
665 {data.map((todo) => (
666 <li key={todo.id}>{todo.text}</li>
667 ))}
668 </ul>
669 )
670 }
671​
672 function App() {
673 return (
674 <Suspense fallback={<div>Loading...</div>}>
675 <TodoList />
676 </Suspense>
677 )
678 }
679 ```
680​
681 **Implementation details:**
682 - Throws promises when collection is loading (caught by Suspense)
683 - Throws errors when collection fails (caught by Error Boundary)
684 - Reuses promise across re-renders to prevent infinite loops
685 - Detects dependency changes and creates new collection/promise
686 - Same TypeScript overloads as useLiveQuery for consistency
687​
688 **Documentation:**
689 - Comprehensive guide in live-queries.md covering usage patterns and when to use each hook
690 - Comparison with useLiveQuery showing different approaches to loading/error states
691 - Router loader pattern recommendation for React Router/TanStack Router users
692 - Error handling examples with Suspense and Error Boundaries
693​
694 Resolves #692
695​
696## 0.1.40
697​
698### Patch Changes
699​
700- Updated dependencies [[`f416231`](https://github.com/TanStack/db/commit/f41623180c862b58b4fa6415383dfdb034f84ee9), [`b1b8299`](https://github.com/TanStack/db/commit/b1b82994cb9765225129b5a19be06e9369e3158d)]:
701 - @tanstack/db@0.4.18
702​
703## 0.1.39
704​
705### Patch Changes
706​
707- Updated dependencies [[`49bcaa5`](https://github.com/TanStack/db/commit/49bcaa5557ba8d647c947811ed6e0c2450159d84)]:
708 - @tanstack/db@0.4.17
709​
710## 0.1.38
711​
712### Patch Changes
713​
714- Add paced mutations with pluggable timing strategies ([#704](https://github.com/TanStack/db/pull/704))
715​
716 Introduces a new paced mutations system that enables optimistic mutations with pluggable timing strategies. This provides fine-grained control over when and how mutations are persisted to the backend. Powered by [TanStack Pacer](https://github.com/TanStack/pacer).
717​
718 **Key Design:**
719 - **Debounce/Throttle**: Only one pending transaction (collecting mutations) and one persisting transaction (writing to backend) at a time. Multiple rapid mutations automatically merge together.
720 - **Queue**: Each mutation creates a separate transaction, guaranteed to run in the order they're made (FIFO by default, configurable to LIFO).
721​
722 **Core Features:**
723 - **Pluggable Strategy System**: Choose from debounce, queue, or throttle strategies to control mutation timing
724 - **Auto-merging Mutations**: Multiple rapid mutations on the same item automatically merge for efficiency (debounce/throttle only)
725 - **Transaction Management**: Full transaction lifecycle tracking (pending → persisting → completed/failed)
726 - **React Hook**: `usePacedMutations` for easy integration in React applications
727​
728 **Available Strategies:**
729 - `debounceStrategy`: Wait for inactivity before persisting. Only final state is saved. (ideal for auto-save, search-as-you-type)
730 - `queueStrategy`: Each mutation becomes a separate transaction, processed sequentially in order (defaults to FIFO, configurable to LIFO). All mutations are guaranteed to persist. (ideal for sequential workflows, rate-limited APIs)
731 - `throttleStrategy`: Ensure minimum spacing between executions. Mutations between executions are merged. (ideal for analytics, progress updates)
732​
733 **Example Usage:**
734​
735 ```ts
736 import { usePacedMutations, debounceStrategy } from '@tanstack/react-db'
737​
738 const mutate = usePacedMutations({
739 mutationFn: async ({ transaction }) => {
740 await api.save(transaction.mutations)
741 },
742 strategy: debounceStrategy({ wait: 500 }),
743 })
744​
745 // Trigger a mutation
746 const tx = mutate(() => {
747 collection.update(id, (draft) => {
748 draft.value = newValue
749 })
750 })
751​
752 // Optionally await persistence
753 await tx.isPersisted.promise
754 ```
755​
756- Updated dependencies [[`979a66f`](https://github.com/TanStack/db/commit/979a66f2f6eff0ffe44dfde7c67feea933ee6110), [`f8a979b`](https://github.com/TanStack/db/commit/f8a979ba3aa90ac7e85f7a065fc050bda6589b4b), [`cb25623`](https://github.com/TanStack/db/commit/cb256234c9cd8df7771808b147e5afc2be56f51f)]:
757 - @tanstack/db@0.4.16
758​
759## 0.1.37
760​
761### Patch Changes
762​
763- Updated dependencies [[`6738247`](https://github.com/TanStack/db/commit/673824791bcfae04acf42fc35e5d6d8755adceb2)]:
764 - @tanstack/db@0.4.15
765​
766## 0.1.36
767​
768### Patch Changes
769​
770- Updated dependencies [[`970616b`](https://github.com/TanStack/db/commit/970616b6db723d1716eecd5076417de5d6e9a884)]:
771 - @tanstack/db@0.4.14
772​
773## 0.1.35
774​
775### Patch Changes
776​
777- Updated dependencies [[`3c9526c`](https://github.com/TanStack/db/commit/3c9526cd1fd80032ddddff32cf4a23dfa8376888)]:
778 - @tanstack/db@0.4.13
779​
780## 0.1.34
781​
782### Patch Changes
783​
784- Updated dependencies [[`8b29841`](https://github.com/TanStack/db/commit/8b298417964340bbac5ad08a831766f8f1497477), [`8187c6d`](https://github.com/TanStack/db/commit/8187c6d69c4b498e306ac2eb5fc7115e4f8193a5)]:
785 - @tanstack/db@0.4.12
786​
787## 0.1.33
788​
789### Patch Changes
790​
791- Add support for pre-created live query collections in useLiveInfiniteQuery, enabling router loader patterns where live queries can be created, preloaded, and passed to components. ([#684](https://github.com/TanStack/db/pull/684))
792​
793- Updated dependencies [[`5566b26`](https://github.com/TanStack/db/commit/5566b26100abdae9b4a041f048aeda1dd726e904)]:
794 - @tanstack/db@0.4.11
795​
796## 0.1.32
797​
798### Patch Changes
799​
800- Add `useLiveInfiniteQuery` hook for infinite scrolling with live updates. ([#669](https://github.com/TanStack/db/pull/669))
801​
802 The new `useLiveInfiniteQuery` hook provides an infinite query pattern similar to TanStack Query's `useInfiniteQuery`, but with live updates from your local collection. It uses `liveQueryCollection.utils.setWindow()` internally to efficiently paginate through ordered data without recreating the query on each page fetch.
803​
804 **Key features:**
805 - Automatic live updates as data changes in the collection
806 - Efficient pagination using dynamic window adjustment
807 - Peek-ahead mechanism to detect when more pages are available
808 - Compatible with TanStack Query's infinite query API patterns
809​
810 **Example usage:**
811​
812 ```tsx
813 import { useLiveInfiniteQuery } from '@tanstack/react-db'
814​
815 function PostList() {
816 const { data, pages, fetchNextPage, hasNextPage, isLoading } =
817 useLiveInfiniteQuery(
818 (q) =>
819 q
820 .from({ posts: postsCollection })
821 .orderBy(({ posts }) => posts.createdAt, 'desc'),
822 {
823 pageSize: 20,
824 getNextPageParam: (lastPage, allPages) =>
825 lastPage.length === 20 ? allPages.length : undefined,
826 },
827 )
828​
829 if (isLoading) return <div>Loading...</div>
830​
831 return (
832 <div>
833 {pages.map((page, i) => (
834 <div key={i}>
835 {page.map((post) => (
836 <PostCard key={post.id} post={post} />
837 ))}
838 </div>
839 ))}
840 {hasNextPage && (
841 <button onClick={() => fetchNextPage()}>Load More</button>
842 )}
843 </div>
844 )
845 }
846 ```
847​
848 **Requirements:**
849 - Query must include `.orderBy()` for the window mechanism to work
850 - Returns flattened `data` array and `pages` array for flexible rendering
851 - Automatically detects new pages when data is synced to the collection
852​
853- Updated dependencies [[`63aa8ef`](https://github.com/TanStack/db/commit/63aa8ef8b09960ce0f93e068d41b37fb0503a21a), [`b0687ab`](https://github.com/TanStack/db/commit/b0687ab4c1476362d7a25e3c1704ab0fb0385455)]:
854 - @tanstack/db@0.4.10
855​
856## 0.1.31
857​
858### Patch Changes
859​
860- Updated dependencies [[`e52be92`](https://github.com/TanStack/db/commit/e52be92ce16b09a095b4b9baf7ac2cf708146f47), [`4a7c44a`](https://github.com/TanStack/db/commit/4a7c44a723223ade4e226745eadffead671fff13), [`ee61bb6`](https://github.com/TanStack/db/commit/ee61bb61f76ca510f113e96baa090940719aac40)]:
861 - @tanstack/db@0.4.9
862​
863## 0.1.30
864​
865### Patch Changes
866​
867- 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. ([#658](https://github.com/TanStack/db/pull/658))
868​
869- Updated dependencies [[`d9ae7b7`](https://github.com/TanStack/db/commit/d9ae7b76b8ab30fd55fe835531974eee333dd450), [`44555b7`](https://github.com/TanStack/db/commit/44555b733a1a4d38d8126bf8da51d4b44f898298)]:
870 - @tanstack/db@0.4.8
871​
872## 0.1.29
873​
874### Patch Changes
875​
876- Updated dependencies [[`6692aad`](https://github.com/TanStack/db/commit/6692aad4267e127b71ce595529080d6fc0aa2066)]:
877 - @tanstack/db@0.4.7
878​
879## 0.1.28
880​
881### Patch Changes
882​
883- Updated dependencies [[`dd6cdf7`](https://github.com/TanStack/db/commit/dd6cdf7ea62d91bfb12ea8d25bdd25549259c113), [`c30a20b`](https://github.com/TanStack/db/commit/c30a20b1df39b34f18d0aa7c7b901a27fb963f36)]:
884 - @tanstack/db@0.4.6
885​
886## 0.1.27
887​
888### Patch Changes
889​
890- Updated dependencies [[`7556fb6`](https://github.com/TanStack/db/commit/7556fb6f888b5bdc830fe6448eb3368efeb61988)]:
891 - @tanstack/db@0.4.5
892​
893## 0.1.26
894​
895### Patch Changes
896​
897- Updated dependencies [[`56b870b`](https://github.com/TanStack/db/commit/56b870b3e63f8010b6eeebea87893b10c75a5888), [`f623990`](https://github.com/TanStack/db/commit/f62399062e4db61426ddfbbbe324c48cab2513dd), [`5f43d5f`](https://github.com/TanStack/db/commit/5f43d5f7f47614be8e71856ceb0f91733d9be627), [`05776f5`](https://github.com/TanStack/db/commit/05776f52a8ce4fe41b34fc8cace2046afc42835c), [`d27d32a`](https://github.com/TanStack/db/commit/d27d32aceb7f8fcabc07dcf1b55a84a605d2f23f)]:
898 - @tanstack/db@0.4.4
899​
900## 0.1.25
901​
902### Patch Changes
903​
904- Updated dependencies [[`32f2212`](https://github.com/TanStack/db/commit/32f221278e2a684f3f4e1e2ace1ca98f5ecc858a)]:
905 - @tanstack/db@0.4.3
906​
907## 0.1.24
908​
909### Patch Changes
910​
911- Updated dependencies [[`51c6bc5`](https://github.com/TanStack/db/commit/51c6bc58244ed6a3ac853e7e6af7775b33d6b65a), [`248e2c6`](https://github.com/TanStack/db/commit/248e2c6db8e9df8cf2cb225100e4ba9cb67cd534), [`ce7e2b2`](https://github.com/TanStack/db/commit/ce7e2b209ed882baa29ec86f89f1b527d6580e0b), [`1b832ff`](https://github.com/TanStack/db/commit/1b832ff9ec236e7dbe9256803e2ba12b4c9b9a30)]:
912 - @tanstack/db@0.4.2
913​
914## 0.1.23
915​
916### Patch Changes
917​
918- Updated dependencies [[`8cd0876`](https://github.com/TanStack/db/commit/8cd0876b50bc7c1a614365318d5e74c2f32a0f80)]:
919 - @tanstack/db@0.4.1
920​
921## 0.1.22
922​
923### Patch Changes
924​
925- Let collection.subscribeChanges return a subscription object. Move all data loading code related to optimizations into that subscription object. ([#564](https://github.com/TanStack/db/pull/564))
926​
927- Updated dependencies [[`2f87216`](https://github.com/TanStack/db/commit/2f8721630e06331ca8bb2f962fbb283341103a58), [`ac6250a`](https://github.com/TanStack/db/commit/ac6250a879e95718e8d911732c10fb3388569f0f), [`2f87216`](https://github.com/TanStack/db/commit/2f8721630e06331ca8bb2f962fbb283341103a58)]:
928 - @tanstack/db@0.4.0
929​
930## 0.1.21
931​
932### Patch Changes
933​
934- Expand `useLiveQuery` callback to support conditional queries and additional return types, enabling the ability to temporarily disable the query. ([#535](https://github.com/TanStack/db/pull/535))
935​
936 **New Features:**
937 - Callback can now return `undefined` or `null` to temporarily disable the query
938 - Callback can return a pre-created `Collection` instance to use it directly
939 - Callback can return a `LiveQueryCollectionConfig` object for advanced configuration
940 - When disabled (returning `undefined`/`null`), the hook returns a specific idle state
941​
942 **Usage Examples:**
943​
944 ```ts
945 // Conditional queries - disable when not ready
946 const enabled = useState(false)
947 const { data, state, isIdle } = useLiveQuery((q) => {
948 if (!enabled) return undefined // Disables the query
949 return q.from({ users }).where(...)
950 }, [enabled])
951​
952 /**
953 * When disabled, returns:
954 * {
955 * state: undefined,
956 * data: undefined,
957 * isIdle: true,
958 * ...
959 * }
960 */
961​
962 // Return pre-created Collection
963 const { data } = useLiveQuery((q) => {
964 if (usePrebuilt) return myCollection // Use existing collection
965 return q.from({ items }).select(...)
966 }, [usePrebuilt])
967​
968 // Return LiveQueryCollectionConfig
969 const { data } = useLiveQuery((q) => {
970 return {
971 query: q.from({ items }).select(...),
972 id: `my-collection`,
973 }
974 })
975 ```
976​
977- Updated dependencies [[`cacfca2`](https://github.com/TanStack/db/commit/cacfca2d1b430c34a05202128fd3affa4bff54d6)]:
978 - @tanstack/db@0.3.2
979​
980## 0.1.20
981​
982### Patch Changes
983​
984- Updated dependencies [[`5f51f35`](https://github.com/TanStack/db/commit/5f51f35d2c9543766a00cc5eea1374c62798b34e)]:
985 - @tanstack/db@0.3.1
986​
987## 0.1.19
988​
989### Patch Changes
990​
991- Updated dependencies [[`c557a14`](https://github.com/TanStack/db/commit/c557a1488650ea9081b671a4ac278d55c59ac9cc), [`b5c87f7`](https://github.com/TanStack/db/commit/b5c87f71dbb534e4f1c660cf010e2cb6c0446ec5)]:
992 - @tanstack/db@0.3.0
993​
994## 0.1.18
995​
996### Patch Changes
997​
998- Updated dependencies [[`b03894d`](https://github.com/TanStack/db/commit/b03894db05e063629a3660e03b31a80a48558dd5), [`3968087`](https://github.com/TanStack/db/commit/39680877fdc1993733933d2def13217bd18fa254)]:
999 - @tanstack/db@0.2.5
1000​
1001## 0.1.17
1002​
1003### Patch Changes
1004​
1005- Updated dependencies [[`92febbf`](https://github.com/TanStack/db/commit/92febbf1feaa1d46f8cc4d7a4ea0d44cd5f85256), [`b487430`](https://github.com/TanStack/db/commit/b4874308813f95232f3361de539cec104ed55170)]:
1006 - @tanstack/db@0.2.4
1007​
1008## 0.1.16
1009​
1010### Patch Changes
1011​
1012- Updated dependencies [[`b162556`](https://github.com/TanStack/db/commit/b1625565df44b0824501297f7ef14ae1cd450b49)]:
1013 - @tanstack/db@0.2.3
1014​
1015## 0.1.15
1016​
1017### Patch Changes
1018​
1019- Updated dependencies [[`33515c6`](https://github.com/TanStack/db/commit/33515c69befc557add2cf828354ee378100f3977)]:
1020 - @tanstack/db@0.2.2
1021​
1022## 0.1.14
1023​
1024### Patch Changes
1025​
1026- Updated dependencies [[`620ebea`](https://github.com/TanStack/db/commit/620ebea96eb3fbeec66701b949de9920c4084c17)]:
1027 - @tanstack/db@0.2.1
1028​
1029## 0.1.13
1030​
1031### Patch Changes
1032​
1033- Updated dependencies [[`08303e6`](https://github.com/TanStack/db/commit/08303e645974db97e10b2aca0031abcbce027dd6), [`bafeaa1`](https://github.com/TanStack/db/commit/bafeaa1e9f161ac2200ce86537e442b2aa8e2a5b), [`1814f8c`](https://github.com/TanStack/db/commit/1814f8cc3c0e831c82f8053b86fbbbd737e4f34b), [`31acdf2`](https://github.com/TanStack/db/commit/31acdf2a96411da327f93f0d30fa78d884422969), [`e41ed7e`](https://github.com/TanStack/db/commit/e41ed7e1ff1d94dd3ce0c48b6321f66b8ea044fd), [`51954d8`](https://github.com/TanStack/db/commit/51954d8c5d64291d136159bce293e0ad00a19f88)]:
1034 - @tanstack/db@0.2.0
1035​
1036## 0.1.12
1037​
1038### Patch Changes
1039​
1040- Updated dependencies [[`cc4c34a`](https://github.com/TanStack/db/commit/cc4c34a6b40c81c83aa10c8d00dfc0a3d33c56db)]:
1041 - @tanstack/db@0.1.12
1042​
1043## 0.1.11
1044​
1045### Patch Changes
1046​
1047- Fixed a bug where a race condition could cause initial results not to be rendered when using `useLiveQuery`. ([#485](https://github.com/TanStack/db/pull/485))
1048​
1049- Updated dependencies [[`b869f68`](https://github.com/TanStack/db/commit/b869f68f0109b3126509f202a38855cee38b4276)]:
1050 - @tanstack/db@0.1.11
1051​
1052## 0.1.10
1053​
1054### Patch Changes
1055​
1056- Updated dependencies [[`eb8fd18`](https://github.com/TanStack/db/commit/eb8fd18c50ee03b72cb06e4d7ef25f214367950b), [`e59a355`](https://github.com/TanStack/db/commit/e59a3551e75bac9dd166e14c911d9491e3a67b9a), [`074aab0`](https://github.com/TanStack/db/commit/074aab0477a7c55e9e0f19a705b96ed2619e2afb), [`d469c39`](https://github.com/TanStack/db/commit/d469c39a7bdc034fa4fbc533010573b3515f239f)]:
1057 - @tanstack/db@0.1.10
1058​
1059## 0.1.9
1060​
1061### Patch Changes
1062​
1063- Updated dependencies [[`d64b4a8`](https://github.com/TanStack/db/commit/d64b4a8b692a213c7ad58faaf66f5f5fd50bef66)]:
1064 - @tanstack/db@0.1.9
1065​
1066## 0.1.8
1067​
1068### Patch Changes
1069​
1070- Updated dependencies [[`1c5e206`](https://github.com/TanStack/db/commit/1c5e206d00d0a99f8419f0d00429b5a3c6cdc76e), [`4d20004`](https://github.com/TanStack/db/commit/4d2000488b9b5abf85c05801633297528af0eff6), [`968602e`](https://github.com/TanStack/db/commit/968602e4ffc597eaa559219daf22d6ef6321162a)]:
1071 - @tanstack/db@0.1.8
1072​
1073## 0.1.7
1074​
1075### Patch Changes
1076​
1077- Updated dependencies [[`48d0889`](https://github.com/TanStack/db/commit/48d088996a3f18df026aa7d2d1e7f27d1151345b), [`aecbcc3`](https://github.com/TanStack/db/commit/aecbcc32012561f1645df0bdf89a6c259058d888), [`a937f4c`](https://github.com/TanStack/db/commit/a937f4c7a5f4fc20c255e86692c5e2e80d5ebbec), [`3d60fad`](https://github.com/TanStack/db/commit/3d60fadbb9e8a1b62a9bcde947e282d653a2a270), [`79c95a3`](https://github.com/TanStack/db/commit/79c95a36f60087ffc3f9a02b76975c8bdf40acc7)]:
1078 - @tanstack/db@0.1.7
1079​
1080## 0.1.6
1081​
1082### Patch Changes
1083​
1084- Updated dependencies [[`ad33e9e`](https://github.com/TanStack/db/commit/ad33e9e535ca6197c2e00e2dbb59bf8e8f9bb51e)]:
1085 - @tanstack/db@0.1.6
1086​
1087## 0.1.5
1088​
1089### Patch Changes
1090​
1091- ensure that useLiveQuery returns a stable ref when there are no changes ([#388](https://github.com/TanStack/db/pull/388))
1092​
1093- Updated dependencies [[`9a5a20c`](https://github.com/TanStack/db/commit/9a5a20c21fbf8286ab90e1db6d6f3315f8344a4e)]:
1094 - @tanstack/db@0.1.5
1095​
1096## 0.1.4
1097​
1098### Patch Changes
1099​
1100- Ensure that the ready status is correctly returned from a live query ([#390](https://github.com/TanStack/db/pull/390))
1101​
1102- Updated dependencies [[`c90b4d8`](https://github.com/TanStack/db/commit/c90b4d85822f94f7fe72286d5c7ee07b087d0e20), [`6c1c19c`](https://github.com/TanStack/db/commit/6c1c19cedbc1d9d98396948e8e43fa0515bb8919), [`69a6d2d`](https://github.com/TanStack/db/commit/69a6d2d94c7a5510568c8b652356c62bd2b3cc76), [`6250a92`](https://github.com/TanStack/db/commit/6250a92c8045ef2fd69c107a94e05179471681d7), [`68538b4`](https://github.com/TanStack/db/commit/68538b4c446abeb992e24964f811c8900749f141)]:
1103 - @tanstack/db@0.1.4
1104​
1105## 0.1.3
1106​
1107### Patch Changes
1108​
1109- Updated dependencies [[`0cb7699`](https://github.com/TanStack/db/commit/0cb76999e5d6df5916694a5afeb31b928eab68e4)]:
1110 - @tanstack/db@0.1.3
1111​
1112## 0.1.2
1113​
1114### Patch Changes
1115​
1116- Updated dependencies [[`bb5d50e`](https://github.com/TanStack/db/commit/bb5d50e255d9114ef32b8f52eef6b15399255327), [`97b595e`](https://github.com/TanStack/db/commit/97b595e9617b1abb05c14489e3d608b314da08e8)]:
1117 - @tanstack/db@0.1.2
1118​
1119## 0.1.1
1120​
1121### Patch Changes
1122​
1123- Updated dependencies [[`bc2f204`](https://github.com/TanStack/db/commit/bc2f204b8cb8a4870ade00757d10f846524e2090), [`bda3f24`](https://github.com/TanStack/db/commit/bda3f24cc41504f60be0c5e071698b7735f75e28)]:
1124 - @tanstack/db@0.1.1
1125​
1126## 0.1.0
1127​
1128### Minor Changes
1129​
1130- 0.1 release - first beta 🎉 ([#332](https://github.com/TanStack/db/pull/332))
1131​
1132### Patch Changes
1133​
1134- We have moved development of the differential dataflow implementation from @electric-sql/d2mini to a new @tanstack/db-ivm package inside the tanstack db monorepo to make development simpler. ([#330](https://github.com/TanStack/db/pull/330))
1135​
1136- Updated dependencies [[`7d2f4be`](https://github.com/TanStack/db/commit/7d2f4be95c43aad29fb61e80e5a04c58c859322b), [`f0eda36`](https://github.com/TanStack/db/commit/f0eda36cb36350399bc8835686a6c4b6ad297e45)]:
1137 - @tanstack/db@0.1.0
1138​
1139## 0.0.33
1140​
1141### Patch Changes
1142​
1143- Updated dependencies [[`6e8d7f6`](https://github.com/TanStack/db/commit/6e8d7f660050118e050d575913733e469e3daa8c)]:
1144 - @tanstack/db@0.0.33
1145​
1146## 0.0.32
1147​
1148### Patch Changes
1149​
1150- Updated dependencies [[`e04bd12`](https://github.com/TanStack/db/commit/e04bd1252f612d4638104368d17cb644cc85295b)]:
1151 - @tanstack/db@0.0.32
1152​
1153## 0.0.31
1154​
1155### Patch Changes
1156​
1157- Updated dependencies [[`3e9a36d`](https://github.com/TanStack/db/commit/3e9a36d2600c4f700ca7bc4f720c189a5a29387a)]:
1158 - @tanstack/db@0.0.31
1159​
1160## 0.0.30
1161​
1162### Patch Changes
1163​
1164- Updated dependencies [[`6bdde55`](https://github.com/TanStack/db/commit/6bdde554f36f54c0c4f4dacb74bef5da45811855)]:
1165 - @tanstack/db@0.0.30
1166​
1167## 0.0.29
1168​
1169### Patch Changes
1170​
1171- Updated dependencies [[`ced0657`](https://github.com/TanStack/db/commit/ced0657e72646e35343dfea8389d96e213710cdf), [`dcfef51`](https://github.com/TanStack/db/commit/dcfef51d4d94c756bf77e40e7015e47b7982c09a), [`360b0df`](https://github.com/TanStack/db/commit/360b0dfa411ba9f8a93f6b737aa1df8fb37dd036), [`608be0c`](https://github.com/TanStack/db/commit/608be0c14dc5ae9577deebf436557a1eace46733), [`5260ee3`](https://github.com/TanStack/db/commit/5260ee3098d12eccc58a5cf903ea479908681402)]:
1172 - @tanstack/db@0.0.29
1173​
1174## 0.0.28
1175​
1176### Patch Changes
1177​
1178- Updated dependencies [[`bb85522`](https://github.com/TanStack/db/commit/bb8552210a97dd05d3ca6fdd080a3fd25c1023a6), [`e9e8e5e`](https://github.com/TanStack/db/commit/e9e8e5e20c23fb7f98865d6b8aab05ad5322e5f7)]:
1179 - @tanstack/db@0.0.28
1180​
1181## 0.0.27
1182​
1183### Patch Changes
1184​
1185- Updated dependencies [[`bec8620`](https://github.com/TanStack/db/commit/bec862004deef5fdd560f70107ebd59f7c27656e)]:
1186 - @tanstack/db@0.0.27
1187​
1188## 0.0.26
1189​
1190### Patch Changes
1191​
1192- 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](https://github.com/TanStack/db/pull/228))
1193​
1194- Updated dependencies [[`09c6995`](https://github.com/TanStack/db/commit/09c6995ea9c8e6979d077ca63cbdd6215054ae78)]:
1195 - @tanstack/db@0.0.26
1196​
1197## 0.0.25
1198​
1199### Patch Changes
1200​
1201- Updated dependencies [[`1758eda`](https://github.com/TanStack/db/commit/1758edab9608383d9d1470156021ee632f043e51), [`20f810e`](https://github.com/TanStack/db/commit/20f810e13a7d802bf56da6f0df89b34312ebb2fd)]:
1202 - @tanstack/db@0.0.25
1203​
1204## 0.0.24
1205​
1206### Patch Changes
1207​
1208- Updated dependencies [[`11215d9`](https://github.com/TanStack/db/commit/11215d9544d02e9dc6258c661ba4b5e439e479ed), [`fe42591`](https://github.com/TanStack/db/commit/fe42591bd7ea9955d67ecec4471b44cb7808e74b), [`665efe6`](https://github.com/TanStack/db/commit/665efe660c1aed68139326a2a33904968622a882)]:
1209 - @tanstack/db@0.0.24
1210​
1211## 0.0.23
1212​
1213### Patch Changes
1214​
1215- Updated dependencies [[`056609e`](https://github.com/TanStack/db/commit/056609ed2926e12df5ee08be5fad0a6333e787f3)]:
1216 - @tanstack/db@0.0.23
1217​
1218## 0.0.22
1219​
1220### Patch Changes
1221​
1222- Updated dependencies [[`aeee9a1`](https://github.com/TanStack/db/commit/aeee9a13411527bd0ebfc0a0c06989bdb904b650)]:
1223 - @tanstack/db@0.0.22
1224​
1225## 0.0.21
1226​
1227### Patch Changes
1228​
1229- Updated dependencies [[`8e23322`](https://github.com/TanStack/db/commit/8e233229b25eabed07cdaf12948ba913786bf4f9)]:
1230 - @tanstack/db@0.0.21
1231​
1232## 0.0.20
1233​
1234### Patch Changes
1235​
1236- Updated dependencies [[`f13c11e`](https://github.com/TanStack/db/commit/f13c11ed0ab27cd88b03d789b0cd953e86bd1333)]:
1237 - @tanstack/db@0.0.20
1238​
1239## 0.0.19
1240​
1241### Patch Changes
1242​
1243- Updated dependencies [[`9f0b0c2`](https://github.com/TanStack/db/commit/9f0b0c28ede99273eb5914be28aff55b91c50778)]:
1244 - @tanstack/db@0.0.19
1245​
1246## 0.0.18
1247​
1248### Patch Changes
1249​
1250- Improve jsdocs ([#243](https://github.com/TanStack/db/pull/243))
1251​
1252- Updated dependencies [[`266bd29`](https://github.com/TanStack/db/commit/266bd29514c6c0fa9e903986ca11c5e22f4d2361)]:
1253 - @tanstack/db@0.0.18
1254​
1255## 0.0.17
1256​
1257### Patch Changes
1258​
1259- Updated dependencies [[`7e63d76`](https://github.com/TanStack/db/commit/7e63d7671f9df9f9fc81240c3818789d4ed0d464)]:
1260 - @tanstack/db@0.0.17
1261​
1262## 0.0.16
1263​
1264### Patch Changes
1265​
1266- add support for composable queries ([#232](https://github.com/TanStack/db/pull/232))
1267​
1268- Updated dependencies [[`e478d53`](https://github.com/TanStack/db/commit/e478d5353cc8fc64e3a29dda1f86fba863cf6ce8)]:
1269 - @tanstack/db@0.0.16
1270​
1271## 0.0.15
1272​
1273### Patch Changes
1274​
1275- Updated dependencies [[`f5cf44b`](https://github.com/TanStack/db/commit/f5cf44b1b181afef89a80cf7b8678337a3d4a065), [`f5cf44b`](https://github.com/TanStack/db/commit/f5cf44b1b181afef89a80cf7b8678337a3d4a065)]:
1276 - @tanstack/db@0.0.15
1277​
1278## 0.0.14
1279​
1280### Patch Changes
1281​
1282- Updated dependencies [[`74c140d`](https://github.com/TanStack/db/commit/74c140d8744f1f7bd3f9cb940c75719574afc78f)]:
1283 - @tanstack/db@0.0.14
1284​
1285## 0.0.13
1286​
1287### Patch Changes
1288​
1289- feat: implement Collection Lifecycle Management ([#198](https://github.com/TanStack/db/pull/198))
1290​
1291 Adds automatic lifecycle management for collections to optimize resource usage.
1292​
1293 **New Features:**
1294 - Added `startSync` option (defaults to `false`, set to `true` to start syncing immediately)
1295 - Automatic garbage collection after `gcTime` (default 5 minutes) of inactivity
1296 - Collection status tracking: "idle" | "loading" | "ready" | "error" | "cleaned-up"
1297 - Manual `preload()` and `cleanup()` methods for lifecycle control
1298​
1299 **Usage:**
1300​
1301 ```typescript
1302 const collection = createCollection({
1303 startSync: false, // Enable lazy loading
1304 gcTime: 300000, // Cleanup timeout (default: 5 minutes)
1305 })
1306​
1307 console.log(collection.status) // Current state
1308 await collection.preload() // Ensure ready
1309 await collection.cleanup() // Manual cleanup
1310 ```
1311​
1312- Add createOptimisticAction helper that replaces useOptimisticMutation ([#210](https://github.com/TanStack/db/pull/210))
1313​
1314 An example of converting a `useOptimisticMutation` hook to `createOptimisticAction`. Now all optimistic & server mutation logic are consolidated.
1315​
1316 ```diff
1317 -import { useOptimisticMutation } from '@tanstack/react-db'
1318 +import { createOptimisticAction } from '@tanstack/react-db'
1320 +// Create the `addTodo` action, passing in your `mutationFn` and `onMutate`.
1321 +const addTodo = createOptimisticAction<string>({
1322 + onMutate: (text) => {
1323 + // Instantly applies the local optimistic state.
1324 + todoCollection.insert({
1325 + id: uuid(),
1326 + text,
1327 + completed: false
1328 + })
1329 + },
1330 + mutationFn: async (text) => {
1331 + // Persist the todo to your backend
1332 + const response = await fetch('/api/todos', {
1333 + method: 'POST',
1334 + body: JSON.stringify({ text, completed: false }),
1335 + })
1336 + return response.json()
1337 + }
1338 +})
1339​
1340 const Todo = () => {
1341 - // Create the `addTodo` mutator, passing in your `mutationFn`.
1342 - const addTodo = useOptimisticMutation({ mutationFn })
1344 const handleClick = () => {
1345 - // Triggers the mutationFn
1346 - addTodo.mutate(() =>
1347 - // Instantly applies the local optimistic state.
1348 - todoCollection.insert({
1349 - id: uuid(),
1350 - text: '🔥 Make app faster',
1351 - completed: false
1352 - })
1353 - )
1354 + // Triggers the onMutate and then the mutationFn
1355 + addTodo('🔥 Make app faster')
1357​
1358 return <Button onClick={ handleClick } />
1360 ```
1361​
1362- Updated dependencies [[`945868e`](https://github.com/TanStack/db/commit/945868e95944543ccf5d778409548679a952e249), [`0f8a008`](https://github.com/TanStack/db/commit/0f8a008be8b368f231c8518ad1adfcac08132da2), [`57b5f5d`](https://github.com/TanStack/db/commit/57b5f5de6297326a57ef205a400428af0697b48b)]:
1363 - @tanstack/db@0.0.13
1364​
1365## 0.0.12
1366​
1367### Patch Changes
1368​
1369- Updated dependencies [[`f6abe9b`](https://github.com/TanStack/db/commit/f6abe9b94b890487fe960bd72a89e4a75de89d46)]:
1370 - @tanstack/db@0.0.12
1371​
1372## 0.0.11
1373​
1374### Patch Changes
1375​
1376- Export `ElectricCollectionUtils` & allow passing generic to `createTransaction` ([#179](https://github.com/TanStack/db/pull/179))
1377​
1378- Updated dependencies [[`66ed58b`](https://github.com/TanStack/db/commit/66ed58b66553683ff0a5241de8cde83954d18847), [`c5489ff`](https://github.com/TanStack/db/commit/c5489ff276db07a0a4b65876790ccd7f11a6f99d)]:
1379 - @tanstack/db@0.0.11
1380​
1381## 0.0.10
1382​
1383### Patch Changes
1384​
1385- Updated dependencies [[`38d4505`](https://github.com/TanStack/db/commit/38d45051b065b619b95849f78422e9ace8750361)]:
1386 - @tanstack/db@0.0.10
1387​
1388## 0.0.9
1389​
1390### Patch Changes
1391​
1392- Updated dependencies [[`2ae0b09`](https://github.com/TanStack/db/commit/2ae0b09cc52152b0044818b538e11e8ca10d0f80)]:
1393 - @tanstack/db@0.0.9
1394​
1395## 0.0.8
1396​
1397### Patch Changes
1398​
1399- A large refactor of the core `Collection` with: ([#155](https://github.com/TanStack/db/pull/155))
1400 - a change to not use Store internally and emit fine grade changes with `subscribeChanges` and `subscribeKeyChanges` methods.
1401 - changes to the `Collection` api to be more `Map` like for reads, with `get`, `has`, `size`, `entries`, `keys`, and `values`.
1402 - renames `config.getId` to `config.getKey` for consistency with the `Map` like api.
1403​
1404- Updated dependencies [[`5c538cf`](https://github.com/TanStack/db/commit/5c538cf03573512a8d1bbde96962a9f7ca014708), [`9553366`](https://github.com/TanStack/db/commit/955336604a286d7992f9506cb1c76ecf150d0432), [`b4602a0`](https://github.com/TanStack/db/commit/b4602a071cb6866bb1338e30d5802220b0d1fc49), [`02adc81`](https://github.com/TanStack/db/commit/02adc813177cbb44ab6245cc9821142e9cf97876), [`06d8ecc`](https://github.com/TanStack/db/commit/06d8eccc5aaabc194c31ea89c9b4191e2aa68180), [`c50cd51`](https://github.com/TanStack/db/commit/c50cd51ac8030b391cd9d84e8cd8b8fb57cb8ca5)]:
1405 - @tanstack/db@0.0.8
1406​
1407## 0.0.7
1408​
1409### Patch Changes
1410​
1411- Expose utilities on collection instances ([#161](https://github.com/TanStack/db/pull/161))
1412​
1413 Implemented a utility exposure pattern for TanStack DB collections that allows utility functions to be passed as part of collection options and exposes them under a `.utils` namespace, with full TypeScript typing.
1414 - Refactored `createCollection` in packages/db/src/collection.ts to accept options with utilities directly
1415 - Added `utils` property to CollectionImpl
1416 - Added TypeScript types for utility functions and utility records
1417 - Changed Collection from a class to a type, updating all usages to use createCollection() instead
1418 - Updated Electric/Query implementations
1419 - Utilities are now ergonomically accessible under `.utils`
1420 - Full TypeScript typing is preserved for both collection data and utilities
1421 - API is clean and straightforward - users can call `createCollection(optionsCreator(config))` directly
1422 - Zero-boilerplate TypeScript pattern that infers utility types automatically
1423​
1424- Updated dependencies [[`8b43ad3`](https://github.com/TanStack/db/commit/8b43ad305b277560aed660c31cf1409d22ed1e47)]:
1425 - @tanstack/db@0.0.7
1426​
1427## 0.0.6
1428​
1429### Patch Changes
1430​
1431- Updated dependencies [[`856be72`](https://github.com/TanStack/db/commit/856be725a6299374a3a97c88b50bd5d7bb94b783), [`0455e27`](https://github.com/TanStack/db/commit/0455e27f50d69b1e1887b841dc2f262f4de4c55d), [`80fdac7`](https://github.com/TanStack/db/commit/80fdac76389ea741f5743bc788df375f63fb767b)]:
1432 - @tanstack/db@0.0.6
1433​
1434## 0.0.5
1435​
1436### Patch Changes
1437​
1438- Collections must have a getId function & use an id for update/delete operators ([#134](https://github.com/TanStack/db/pull/134))
1439​
1440- the `keyBy` query operator has been removed, keying withing the query pipeline is now automatic ([#144](https://github.com/TanStack/db/pull/144))
1441​
1442- Updated dependencies [[`1fbb844`](https://github.com/TanStack/db/commit/1fbb8447d8425d37cb9ab4f078ffab999b28b06c), [`338efc2`](https://github.com/TanStack/db/commit/338efc229c3794da5ac373b8b26143e379433407), [`ee5d026`](https://github.com/TanStack/db/commit/ee5d026715962dd0232fcaca513a8fac9189dce2), [`e7b036c`](https://github.com/TanStack/db/commit/e7b036ce6ebd17c94cc944d6d96ca2c645921c3e), [`e4feb0c`](https://github.com/TanStack/db/commit/e4feb0c214835675b47f0aa18a72d004a423df03)]:
1443 - @tanstack/db@0.0.5
1444​
1445## 0.0.4
1446​
1447### Patch Changes
1448​
1449- Updated dependencies [[`8ce449e`](https://github.com/TanStack/db/commit/8ce449ed6d070e9e591d1b74b0db5fed7a3fc92f)]:
1450 - @tanstack/db@0.0.4
1451​
1452## 0.0.3
1453​
1454### Patch Changes
1455​
1456- Updated dependencies [[`b29420b`](https://github.com/TanStack/db/commit/b29420bcdae30dfeffeef63a8753b83306a54e5a)]:
1457 - @tanstack/db@0.0.3
1458​
1459## 0.0.2
1460​
1461### Patch Changes
1462​
1463- Fixed an issue with injecting the optimistic state removal into the reactive live query. ([#78](https://github.com/TanStack/db/pull/78))
1464​
1465- Updated dependencies [[`4c82edb`](https://github.com/TanStack/db/commit/4c82edb9547f26c9de44f5bf43d4385c38920672)]:
1466 - @tanstack/db@0.0.2
1467​
1468## 0.0.3
1469​
1470### Patch Changes
1471​
1472- Make transactions first class & move ownership of mutationFn from collections to transactions ([#53](https://github.com/TanStack/db/pull/53))
1473​
1474- Updated dependencies [[`b42479c`](https://github.com/TanStack/db/commit/b42479cf95f9a820b36e01684b13a9179973f3d8)]:
1475 - @tanstack/db@0.0.3
1476​
1477## 0.0.2
1478​
1479### Patch Changes
1480​
1481- make mutationFn optional for read-only collections ([#12](https://github.com/TanStack/db/pull/12))
1482​
1483- Updated dependencies [[`9bb6e89`](https://github.com/TanStack/db/commit/9bb6e8909cebdcd7c03091bfc12dd37f5ab2e1ea), [`8eb7e9b`](https://github.com/TanStack/db/commit/8eb7e9b1d1f569c5c064e0f440257589486b73cf)]:
1484 - @tanstack/db@0.0.2
1485​
1486## 0.0.1
1487​
1488### Patch Changes
1489​
1490- feat: Initial release ([#2](https://github.com/TanStack/db/pull/2))
1491​
1492- Updated dependencies [[`2d2dd77`](https://github.com/TanStack/db/commit/2d2dd7743f715ffefaeee8e8d11173b751c7043b)]:
1493 - @tanstack/db@0.0.1