Open History to see the last commit
1# examples/react/todo
2
3## 0.1.6
4
5### Patch Changes
6
7- Updated dependencies [[`c30a20b`](https://github.com/TanStack/db/commit/c30a20b1df39b34f18d0aa7c7b901a27fb963f36)]:
8 - @tanstack/electric-db-collection@0.1.30
9 - @tanstack/query-db-collection@0.2.27
10 - @tanstack/react-db@0.1.28
11 - @tanstack/trailbase-db-collection@0.1.28
12
13## 0.1.5
14
15### Patch Changes
16
17- Updated dependencies [[`a8624c8`](https://github.com/TanStack/db/commit/a8624c8770f5e85ce92e8417e56a56be039cb0c4)]:
18 - @tanstack/electric-db-collection@0.1.29
19 - @tanstack/query-db-collection@0.2.26
20 - @tanstack/react-db@0.1.27
21 - @tanstack/trailbase-db-collection@0.1.27
22
23## 0.1.4
24
25### Patch Changes
26
27- Updated dependencies [[`b38bd76`](https://github.com/TanStack/db/commit/b38bd768560966af67f859a28d4e15a0f877a199)]:
28 - @tanstack/query-db-collection@0.2.25
29 - @tanstack/electric-db-collection@0.1.28
30 - @tanstack/react-db@0.1.26
31 - @tanstack/trailbase-db-collection@0.1.26
32
33## 0.1.3
34
35### Patch Changes
36
37- Updated dependencies []:
38 - @tanstack/electric-db-collection@0.1.27
39 - @tanstack/query-db-collection@0.2.24
40 - @tanstack/react-db@0.1.25
41 - @tanstack/trailbase-db-collection@0.1.25
42
43## 0.1.2
44
45### Patch Changes
46
47- Updated dependencies [[`a064cb4`](https://github.com/TanStack/db/commit/a064cb42b69da45a306213ab1ef96590d4420575), [`1b832ff`](https://github.com/TanStack/db/commit/1b832ff9ec236e7dbe9256803e2ba12b4c9b9a30), [`271960d`](https://github.com/TanStack/db/commit/271960d65255294870503f0f92b706e1a73f26ba)]:
48 - @tanstack/query-db-collection@0.2.23
49 - @tanstack/electric-db-collection@0.1.26
50 - @tanstack/react-db@0.1.24
51 - @tanstack/trailbase-db-collection@0.1.24
52
53## 0.1.1
54
55### Patch Changes
56
57- Updated dependencies [[`1220d7e`](https://github.com/TanStack/db/commit/1220d7eb6b544f05c2ea2f629ee75f969ebcda40)]:
58 - @tanstack/query-db-collection@0.2.0
59
60## 0.1.0
61
62### Minor Changes
63
64- 0.1 release - first beta 🎉 ([#332](https://github.com/TanStack/db/pull/332))
65
66### Patch Changes
67
68- Updated dependencies [[`7d2f4be`](https://github.com/TanStack/db/commit/7d2f4be95c43aad29fb61e80e5a04c58c859322b), [`f0eda36`](https://github.com/TanStack/db/commit/f0eda36cb36350399bc8835686a6c4b6ad297e45)]:
69 - @tanstack/electric-db-collection@0.1.0
70 - @tanstack/query-db-collection@0.1.0
71 - @tanstack/react-db@0.1.0
72 - @tanstack/trailbase-db-collection@0.1.0
73
74## 0.0.39
75
76### Patch Changes
77
78- Updated dependencies []:
79 - @tanstack/electric-db-collection@0.0.15
80 - @tanstack/query-db-collection@0.0.15
81 - @tanstack/react-db@0.0.33
82 - @tanstack/trailbase-db-collection@0.0.9
83
84## 0.0.38
85
86### Patch Changes
87
88- Updated dependencies [[`e04bd12`](https://github.com/TanStack/db/commit/e04bd1252f612d4638104368d17cb644cc85295b)]:
89 - @tanstack/query-db-collection@0.0.14
90 - @tanstack/electric-db-collection@0.0.14
91 - @tanstack/react-db@0.0.32
92 - @tanstack/trailbase-db-collection@0.0.8
93
94## 0.0.37
95
96### Patch Changes
97
98- Updated dependencies []:
99 - @tanstack/electric-db-collection@0.0.13
100 - @tanstack/query-db-collection@0.0.13
101 - @tanstack/react-db@0.0.31
102 - @tanstack/trailbase-db-collection@0.0.7
103
104## 0.0.36
105
106### Patch Changes
107
108- Updated dependencies []:
109 - @tanstack/electric-db-collection@0.0.12
110 - @tanstack/query-db-collection@0.0.12
111 - @tanstack/react-db@0.0.30
112 - @tanstack/trailbase-db-collection@0.0.6
113
114## 0.0.35
115
116### Patch Changes
117
118- Updated dependencies [[`5260ee3`](https://github.com/TanStack/db/commit/5260ee3098d12eccc58a5cf903ea479908681402)]:
119 - @tanstack/trailbase-db-collection@0.0.5
120 - @tanstack/electric-db-collection@0.0.11
121 - @tanstack/query-db-collection@0.0.11
122 - @tanstack/react-db@0.0.29
123
124## 0.0.34
125
126### Patch Changes
127
128- Updated dependencies []:
129 - @tanstack/electric-db-collection@0.0.10
130 - @tanstack/query-db-collection@0.0.10
131 - @tanstack/react-db@0.0.28
132 - @tanstack/trailbase-db-collection@0.0.4
133
134## 0.0.33
135
136### Patch Changes
137
138- Updated dependencies []:
139 - @tanstack/electric-db-collection@0.0.9
140 - @tanstack/query-db-collection@0.0.9
141 - @tanstack/react-db@0.0.27
142 - @tanstack/trailbase-db-collection@0.0.3
143
144## 0.0.32
145
146### Patch Changes
147
148- 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))
149
150- Updated dependencies [[`09c6995`](https://github.com/TanStack/db/commit/09c6995ea9c8e6979d077ca63cbdd6215054ae78)]:
151 - @tanstack/trailbase-db-collection@0.0.2
152 - @tanstack/electric-db-collection@0.0.8
153 - @tanstack/query-db-collection@0.0.8
154 - @tanstack/react-db@0.0.26
155
156## 0.0.31
157
158### Patch Changes
159
160- Updated dependencies [[`20f810e`](https://github.com/TanStack/db/commit/20f810e13a7d802bf56da6f0df89b34312ebb2fd)]:
161 - @tanstack/electric-db-collection@0.0.7
162 - @tanstack/query-db-collection@0.0.7
163 - @tanstack/react-db@0.0.25
164
165## 0.0.30
166
167### Patch Changes
168
169- Updated dependencies []:
170 - @tanstack/electric-db-collection@0.0.6
171 - @tanstack/query-db-collection@0.0.6
172 - @tanstack/react-db@0.0.24
173
174## 0.0.29
175
176### Patch Changes
177
178- Updated dependencies []:
179 - @tanstack/electric-db-collection@0.0.5
180 - @tanstack/query-db-collection@0.0.5
181 - @tanstack/react-db@0.0.23
182
183## 0.0.28
184
185### Patch Changes
186
187- Updated dependencies []:
188 - @tanstack/electric-db-collection@0.0.4
189 - @tanstack/query-db-collection@0.0.4
190 - @tanstack/react-db@0.0.22
191
192## 0.0.27
193
194### Patch Changes
195
196- Move Collections to their own packages ([#252](https://github.com/TanStack/db/pull/252))
197 - Move local-only and local-storage collections to main `@tanstack/db` package
198 - Create new `@tanstack/electric-db-collection` package for ElectricSQL integration
199 - Create new `@tanstack/query-db-collection` package for TanStack Query integration
200 - Delete `@tanstack/db-collections` package (removed from repo)
201 - Update example app and documentation to use new package structure
202
203 Why?
204 - Better separation of concerns
205 - Independent versioning for each collection type
206 - Cleaner dependencies (electric collections don't need query deps, etc.)
207 - Easier to add more collection types moving forward
208
209- Updated dependencies [[`8e23322`](https://github.com/TanStack/db/commit/8e233229b25eabed07cdaf12948ba913786bf4f9)]:
210 - @tanstack/electric-db-collection@0.0.3
211 - @tanstack/query-db-collection@0.0.3
212 - @tanstack/react-db@0.0.21
213
214## 0.0.26
215
216### Patch Changes
217
218- Updated dependencies []:
219 - @tanstack/db-collections@0.0.24
220 - @tanstack/react-db@0.0.20
221
222## 0.0.25
223
224### Patch Changes
225
226- - [Breaking change for the Electric Collection]: Use numbers for txid ([#245](https://github.com/TanStack/db/pull/245))
227 - misc type fixes
228- Updated dependencies [[`9f0b0c2`](https://github.com/TanStack/db/commit/9f0b0c28ede99273eb5914be28aff55b91c50778)]:
229 - @tanstack/db-collections@0.0.23
230 - @tanstack/react-db@0.0.19
231
232## 0.0.24
233
234### Patch Changes
235
236- Updated dependencies [[`266bd29`](https://github.com/TanStack/db/commit/266bd29514c6c0fa9e903986ca11c5e22f4d2361)]:
237 - @tanstack/db-collections@0.0.22
238 - @tanstack/react-db@0.0.18
239
240## 0.0.23
241
242### Patch Changes
243
244- Updated dependencies [[`1c9e867`](https://github.com/TanStack/db/commit/1c9e8676405b71a45831456c7119420975ae1456)]:
245 - @tanstack/db-collections@0.0.21
246 - @tanstack/react-db@0.0.17
247
248## 0.0.22
249
250### Patch Changes
251
252- Updated dependencies [[`e478d53`](https://github.com/TanStack/db/commit/e478d5353cc8fc64e3a29dda1f86fba863cf6ce8)]:
253 - @tanstack/react-db@0.0.16
254 - @tanstack/db-collections@0.0.20
255
256## 0.0.21
257
258### Patch Changes
259
260- Updated dependencies [[`0912a7c`](https://github.com/TanStack/db/commit/0912a7c165325e6981f0b702c169004e08d57f75)]:
261 - @tanstack/db-collections@0.0.19
262 - @tanstack/react-db@0.0.15
263
264## 0.0.20
265
266### Patch Changes
267
268- Updated dependencies [[`0dede0a`](https://github.com/TanStack/db/commit/0dede0ab75e66df9797d5c898defdc66685c6f91)]:
269 - @tanstack/db-collections@0.0.18
270
271## 0.0.19
272
273### Patch Changes
274
275- Updated dependencies []:
276 - @tanstack/db-collections@0.0.17
277 - @tanstack/react-db@0.0.14
278
279## 0.0.18
280
281### Patch Changes
282
283- Updated dependencies [[`945868e`](https://github.com/TanStack/db/commit/945868e95944543ccf5d778409548679a952e249), [`57b5f5d`](https://github.com/TanStack/db/commit/57b5f5de6297326a57ef205a400428af0697b48b)]:
284 - @tanstack/react-db@0.0.13
285 - @tanstack/db-collections@0.0.16
286
287## 0.0.17
288
289### Patch Changes
290
291- Updated dependencies [[`5cafaf4`](https://github.com/TanStack/db/commit/5cafaf4f73018599ce799778029833d3fa83dbc9)]:
292 - @tanstack/db-collections@0.0.15
293
294## 0.0.16
295
296### Patch Changes
297
298- Updated dependencies [[`f6abe9b`](https://github.com/TanStack/db/commit/f6abe9b94b890487fe960bd72a89e4a75de89d46)]:
299 - @tanstack/db-collections@0.0.14
300 - @tanstack/react-db@0.0.12
301
302## 0.0.15
303
304### Patch Changes
305
306- Export `ElectricCollectionUtils` & allow passing generic to `createTransaction` ([#179](https://github.com/TanStack/db/pull/179))
307
308- Updated dependencies [[`c5489ff`](https://github.com/TanStack/db/commit/c5489ff276db07a0a4b65876790ccd7f11a6f99d)]:
309 - @tanstack/db-collections@0.0.13
310 - @tanstack/react-db@0.0.11
311
312## 0.0.14
313
314### Patch Changes
315
316- Updated dependencies []:
317 - @tanstack/db-collections@0.0.12
318 - @tanstack/react-db@0.0.10
319
320## 0.0.13
321
322### Patch Changes
323
324- Updated dependencies []:
325 - @tanstack/db-collections@0.0.11
326 - @tanstack/react-db@0.0.9
327
328## 0.0.12
329
330### Patch Changes
331
332- Type PendingMutation whenever possible ([#163](https://github.com/TanStack/db/pull/163))
333
334- Updated dependencies [[`5c538cf`](https://github.com/TanStack/db/commit/5c538cf03573512a8d1bbde96962a9f7ca014708), [`b4602a0`](https://github.com/TanStack/db/commit/b4602a071cb6866bb1338e30d5802220b0d1fc49)]:
335 - @tanstack/db-collections@0.0.10
336 - @tanstack/react-db@0.0.8
337
338## 0.0.11
339
340### Patch Changes
341
342- Updated dependencies [[`8b43ad3`](https://github.com/TanStack/db/commit/8b43ad305b277560aed660c31cf1409d22ed1e47)]:
343 - @tanstack/db-collections@0.0.9
344 - @tanstack/react-db@0.0.7
345
346## 0.0.10
347
348### Patch Changes
349
350- This change introduces a more streamlined and intuitive API for handling mutations by allowing `onInsert`, `onUpdate`, and `onDelete` handlers to be defined directly on the collection configuration. ([#156](https://github.com/TanStack/db/pull/156))
351
352 When `collection.insert()`, `.update()`, or `.delete()` are called outside of an explicit transaction (i.e., not within `useOptimisticMutation`), the library now automatically creates a single-operation transaction and invokes the corresponding handler to persist the change.
353
354 Key changes:
355 - **`@tanstack/db`**: The `Collection` class now supports `onInsert`, `onUpdate`, and `onDelete` in its configuration. Direct calls to mutation methods will throw an error if the corresponding handler is not defined.
356 - **`@tanstack/db-collections`**:
357 - `queryCollectionOptions` now accepts the new handlers and will automatically `refetch` the collection's query after a handler successfully completes. This behavior can be disabled if the handler returns `{ refetch: false }`.
358 - `electricCollectionOptions` also 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 this `txid` to be synced back before resolving the mutation, ensuring consistency.
359 - **Breaking Change**: Calling `collection.insert()`, `.update()`, or `.delete()` without being inside a `useOptimisticMutation` callback and without a corresponding persistence handler (`onInsert`, etc.) configured on the collection will now throw an error.
360
361 This new pattern simplifies the most common use cases, making the code more declarative. The `useOptimisticMutation` hook remains available for more complex scenarios, such as transactions involving multiple mutations across different collections.
362
363 ***
364
365 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.
366 - The `README.md` and `docs/overview.md` files have been updated to de-emphasize `useOptimisticMutation` for simple writes. They now showcase the much simpler API of calling `collection.insert()` directly and defining persistence logic in the collection's configuration.
367 - The React Todo example (`examples/react/todo/src/App.tsx`) has been completely overhauled. All instances of `useOptimisticMutation` have been removed and replaced with the new `onInsert`, `onUpdate`, and `onDelete` handlers, resulting in cleaner and more concise code.
368
369- Updated dependencies [[`80fdac7`](https://github.com/TanStack/db/commit/80fdac76389ea741f5743bc788df375f63fb767b)]:
370 - @tanstack/db-collections@0.0.8
371 - @tanstack/react-db@0.0.6
372
373## 0.0.9
374
375### Patch Changes
376
377- Collections must have a getId function & use an id for update/delete operators ([#134](https://github.com/TanStack/db/pull/134))
378
379- Switch to Collection options factories instead of extending the Collection class ([#145](https://github.com/TanStack/db/pull/145))
380
381 This refactors `ElectricCollection` and `QueryCollection` into factory functions (`electricCollectionOptions` and `queryCollectionOptions`) that return standard `CollectionConfig` objects and utility functions. Also adds a `createCollection` function to standardize collection instantiation.
382
383- Updated dependencies [[`1fbb844`](https://github.com/TanStack/db/commit/1fbb8447d8425d37cb9ab4f078ffab999b28b06c), [`ee5d026`](https://github.com/TanStack/db/commit/ee5d026715962dd0232fcaca513a8fac9189dce2), [`e4feb0c`](https://github.com/TanStack/db/commit/e4feb0c214835675b47f0aa18a72d004a423df03)]:
384 - @tanstack/db-collections@0.0.7
385 - @tanstack/react-db@0.0.5
386
387## 0.0.8
388
389### Patch Changes
390
391- Updated dependencies []:
392 - @tanstack/db-collections@0.0.6
393 - @tanstack/react-db@0.0.4
394
395## 0.0.7
396
397### Patch Changes
398
399- Updated dependencies [[`0bbf4c4`](https://github.com/TanStack/db/commit/0bbf4c46e01b382a70a437f05dfc09c9ff749a15)]:
400 - @tanstack/db-collections@0.0.5
401
402## 0.0.6
403
404### Patch Changes
405
406- Updated dependencies [[`2d0fcf1`](https://github.com/TanStack/db/commit/2d0fcf16a61a3fcd6a7220b5501640cc0f67218f)]:
407 - @tanstack/db-collections@0.0.4
408
409## 0.0.5
410
411### Patch Changes
412
413- Updated dependencies []:
414 - @tanstack/db-collections@0.0.3
415 - @tanstack/react-db@0.0.3
416
417## 0.0.4
418
419### Patch Changes
420
421- Updated dependencies [[`4c82edb`](https://github.com/TanStack/db/commit/4c82edb9547f26c9de44f5bf43d4385c38920672), [`4c82edb`](https://github.com/TanStack/db/commit/4c82edb9547f26c9de44f5bf43d4385c38920672)]:
422 - @tanstack/react-db@0.0.2
423 - @tanstack/db-collections@0.0.2
424
425## 0.0.3
426
427### Patch Changes
428
429- Updated dependencies [[`b42479c`](https://github.com/TanStack/db/commit/b42479cf95f9a820b36e01684b13a9179973f3d8)]:
430 - @tanstack/react-db@0.0.3
431
432## 0.0.2
433
434### Patch Changes
435
436- Updated dependencies [[`9bb6e89`](https://github.com/TanStack/db/commit/9bb6e8909cebdcd7c03091bfc12dd37f5ab2e1ea)]:
437 - @tanstack/react-db@0.0.2