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

CHANGELOG.md

387 lines13.2 KB

1# examples/react/todo
2​
3## 0.1.1
4​
5### Patch Changes
6​
7- Updated dependencies [[`1220d7e`](https://github.com/TanStack/db/commit/1220d7eb6b544f05c2ea2f629ee75f969ebcda40)]:
8 - @tanstack/query-db-collection@0.2.0
9​
10## 0.1.0
11​
12### Minor Changes
13​
14- 0.1 release - first beta 🎉 ([#332](https://github.com/TanStack/db/pull/332))
15​
16### Patch Changes
17​
18- Updated dependencies [[`7d2f4be`](https://github.com/TanStack/db/commit/7d2f4be95c43aad29fb61e80e5a04c58c859322b), [`f0eda36`](https://github.com/TanStack/db/commit/f0eda36cb36350399bc8835686a6c4b6ad297e45)]:
19 - @tanstack/electric-db-collection@0.1.0
20 - @tanstack/query-db-collection@0.1.0
21 - @tanstack/react-db@0.1.0
22 - @tanstack/trailbase-db-collection@0.1.0
23​
24## 0.0.39
25​
26### Patch Changes
27​
28- Updated dependencies []:
29 - @tanstack/electric-db-collection@0.0.15
30 - @tanstack/query-db-collection@0.0.15
31 - @tanstack/react-db@0.0.33
32 - @tanstack/trailbase-db-collection@0.0.9
33​
34## 0.0.38
35​
36### Patch Changes
37​
38- Updated dependencies [[`e04bd12`](https://github.com/TanStack/db/commit/e04bd1252f612d4638104368d17cb644cc85295b)]:
39 - @tanstack/query-db-collection@0.0.14
40 - @tanstack/electric-db-collection@0.0.14
41 - @tanstack/react-db@0.0.32
42 - @tanstack/trailbase-db-collection@0.0.8
43​
44## 0.0.37
45​
46### Patch Changes
47​
48- Updated dependencies []:
49 - @tanstack/electric-db-collection@0.0.13
50 - @tanstack/query-db-collection@0.0.13
51 - @tanstack/react-db@0.0.31
52 - @tanstack/trailbase-db-collection@0.0.7
53​
54## 0.0.36
55​
56### Patch Changes
57​
58- Updated dependencies []:
59 - @tanstack/electric-db-collection@0.0.12
60 - @tanstack/query-db-collection@0.0.12
61 - @tanstack/react-db@0.0.30
62 - @tanstack/trailbase-db-collection@0.0.6
63​
64## 0.0.35
65​
66### Patch Changes
67​
68- Updated dependencies [[`5260ee3`](https://github.com/TanStack/db/commit/5260ee3098d12eccc58a5cf903ea479908681402)]:
69 - @tanstack/trailbase-db-collection@0.0.5
70 - @tanstack/electric-db-collection@0.0.11
71 - @tanstack/query-db-collection@0.0.11
72 - @tanstack/react-db@0.0.29
73​
74## 0.0.34
75​
76### Patch Changes
77​
78- Updated dependencies []:
79 - @tanstack/electric-db-collection@0.0.10
80 - @tanstack/query-db-collection@0.0.10
81 - @tanstack/react-db@0.0.28
82 - @tanstack/trailbase-db-collection@0.0.4
83​
84## 0.0.33
85​
86### Patch Changes
87​
88- Updated dependencies []:
89 - @tanstack/electric-db-collection@0.0.9
90 - @tanstack/query-db-collection@0.0.9
91 - @tanstack/react-db@0.0.27
92 - @tanstack/trailbase-db-collection@0.0.3
93​
94## 0.0.32
95​
96### Patch Changes
97​
98- 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))
99​
100- Updated dependencies [[`09c6995`](https://github.com/TanStack/db/commit/09c6995ea9c8e6979d077ca63cbdd6215054ae78)]:
101 - @tanstack/trailbase-db-collection@0.0.2
102 - @tanstack/electric-db-collection@0.0.8
103 - @tanstack/query-db-collection@0.0.8
104 - @tanstack/react-db@0.0.26
105​
106## 0.0.31
107​
108### Patch Changes
109​
110- Updated dependencies [[`20f810e`](https://github.com/TanStack/db/commit/20f810e13a7d802bf56da6f0df89b34312ebb2fd)]:
111 - @tanstack/electric-db-collection@0.0.7
112 - @tanstack/query-db-collection@0.0.7
113 - @tanstack/react-db@0.0.25
114​
115## 0.0.30
116​
117### Patch Changes
118​
119- Updated dependencies []:
120 - @tanstack/electric-db-collection@0.0.6
121 - @tanstack/query-db-collection@0.0.6
122 - @tanstack/react-db@0.0.24
123​
124## 0.0.29
125​
126### Patch Changes
127​
128- Updated dependencies []:
129 - @tanstack/electric-db-collection@0.0.5
130 - @tanstack/query-db-collection@0.0.5
131 - @tanstack/react-db@0.0.23
132​
133## 0.0.28
134​
135### Patch Changes
136​
137- Updated dependencies []:
138 - @tanstack/electric-db-collection@0.0.4
139 - @tanstack/query-db-collection@0.0.4
140 - @tanstack/react-db@0.0.22
141​
142## 0.0.27
143​
144### Patch Changes
145​
146- Move Collections to their own packages ([#252](https://github.com/TanStack/db/pull/252))
147 - Move local-only and local-storage collections to main `@tanstack/db` package
148 - Create new `@tanstack/electric-db-collection` package for ElectricSQL integration
149 - Create new `@tanstack/query-db-collection` package for TanStack Query integration
150 - Delete `@tanstack/db-collections` package (removed from repo)
151 - Update example app and documentation to use new package structure
152​
153 Why?
154 - Better separation of concerns
155 - Independent versioning for each collection type
156 - Cleaner dependencies (electric collections don't need query deps, etc.)
157 - Easier to add more collection types moving forward
158​
159- Updated dependencies [[`8e23322`](https://github.com/TanStack/db/commit/8e233229b25eabed07cdaf12948ba913786bf4f9)]:
160 - @tanstack/electric-db-collection@0.0.3
161 - @tanstack/query-db-collection@0.0.3
162 - @tanstack/react-db@0.0.21
163​
164## 0.0.26
165​
166### Patch Changes
167​
168- Updated dependencies []:
169 - @tanstack/db-collections@0.0.24
170 - @tanstack/react-db@0.0.20
171​
172## 0.0.25
173​
174### Patch Changes
175​
176- - [Breaking change for the Electric Collection]: Use numbers for txid ([#245](https://github.com/TanStack/db/pull/245))
177 - misc type fixes
178- Updated dependencies [[`9f0b0c2`](https://github.com/TanStack/db/commit/9f0b0c28ede99273eb5914be28aff55b91c50778)]:
179 - @tanstack/db-collections@0.0.23
180 - @tanstack/react-db@0.0.19
181​
182## 0.0.24
183​
184### Patch Changes
185​
186- Updated dependencies [[`266bd29`](https://github.com/TanStack/db/commit/266bd29514c6c0fa9e903986ca11c5e22f4d2361)]:
187 - @tanstack/db-collections@0.0.22
188 - @tanstack/react-db@0.0.18
189​
190## 0.0.23
191​
192### Patch Changes
193​
194- Updated dependencies [[`1c9e867`](https://github.com/TanStack/db/commit/1c9e8676405b71a45831456c7119420975ae1456)]:
195 - @tanstack/db-collections@0.0.21
196 - @tanstack/react-db@0.0.17
197​
198## 0.0.22
199​
200### Patch Changes
201​
202- Updated dependencies [[`e478d53`](https://github.com/TanStack/db/commit/e478d5353cc8fc64e3a29dda1f86fba863cf6ce8)]:
203 - @tanstack/react-db@0.0.16
204 - @tanstack/db-collections@0.0.20
205​
206## 0.0.21
207​
208### Patch Changes
209​
210- Updated dependencies [[`0912a7c`](https://github.com/TanStack/db/commit/0912a7c165325e6981f0b702c169004e08d57f75)]:
211 - @tanstack/db-collections@0.0.19
212 - @tanstack/react-db@0.0.15
213​
214## 0.0.20
215​
216### Patch Changes
217​
218- Updated dependencies [[`0dede0a`](https://github.com/TanStack/db/commit/0dede0ab75e66df9797d5c898defdc66685c6f91)]:
219 - @tanstack/db-collections@0.0.18
220​
221## 0.0.19
222​
223### Patch Changes
224​
225- Updated dependencies []:
226 - @tanstack/db-collections@0.0.17
227 - @tanstack/react-db@0.0.14
228​
229## 0.0.18
230​
231### Patch Changes
232​
233- Updated dependencies [[`945868e`](https://github.com/TanStack/db/commit/945868e95944543ccf5d778409548679a952e249), [`57b5f5d`](https://github.com/TanStack/db/commit/57b5f5de6297326a57ef205a400428af0697b48b)]:
234 - @tanstack/react-db@0.0.13
235 - @tanstack/db-collections@0.0.16
236​
237## 0.0.17
238​
239### Patch Changes
240​
241- Updated dependencies [[`5cafaf4`](https://github.com/TanStack/db/commit/5cafaf4f73018599ce799778029833d3fa83dbc9)]:
242 - @tanstack/db-collections@0.0.15
243​
244## 0.0.16
245​
246### Patch Changes
247​
248- Updated dependencies [[`f6abe9b`](https://github.com/TanStack/db/commit/f6abe9b94b890487fe960bd72a89e4a75de89d46)]:
249 - @tanstack/db-collections@0.0.14
250 - @tanstack/react-db@0.0.12
251​
252## 0.0.15
253​
254### Patch Changes
255​
256- Export `ElectricCollectionUtils` & allow passing generic to `createTransaction` ([#179](https://github.com/TanStack/db/pull/179))
257​
258- Updated dependencies [[`c5489ff`](https://github.com/TanStack/db/commit/c5489ff276db07a0a4b65876790ccd7f11a6f99d)]:
259 - @tanstack/db-collections@0.0.13
260 - @tanstack/react-db@0.0.11
261​
262## 0.0.14
263​
264### Patch Changes
265​
266- Updated dependencies []:
267 - @tanstack/db-collections@0.0.12
268 - @tanstack/react-db@0.0.10
269​
270## 0.0.13
271​
272### Patch Changes
273​
274- Updated dependencies []:
275 - @tanstack/db-collections@0.0.11
276 - @tanstack/react-db@0.0.9
277​
278## 0.0.12
279​
280### Patch Changes
281​
282- Type PendingMutation whenever possible ([#163](https://github.com/TanStack/db/pull/163))
283​
284- Updated dependencies [[`5c538cf`](https://github.com/TanStack/db/commit/5c538cf03573512a8d1bbde96962a9f7ca014708), [`b4602a0`](https://github.com/TanStack/db/commit/b4602a071cb6866bb1338e30d5802220b0d1fc49)]:
285 - @tanstack/db-collections@0.0.10
286 - @tanstack/react-db@0.0.8
287​
288## 0.0.11
289​
290### Patch Changes
291​
292- Updated dependencies [[`8b43ad3`](https://github.com/TanStack/db/commit/8b43ad305b277560aed660c31cf1409d22ed1e47)]:
293 - @tanstack/db-collections@0.0.9
294 - @tanstack/react-db@0.0.7
295​
296## 0.0.10
297​
298### Patch Changes
299​
300- 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))
301​
302 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.
303​
304 Key changes:
305 - **`@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.
306 - **`@tanstack/db-collections`**:
307 - `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 }`.
308 - `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.
309 - **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.
310​
311 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.
312​
313 ***
314​
315 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.
316 - 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.
317 - 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.
318​
319- Updated dependencies [[`80fdac7`](https://github.com/TanStack/db/commit/80fdac76389ea741f5743bc788df375f63fb767b)]:
320 - @tanstack/db-collections@0.0.8
321 - @tanstack/react-db@0.0.6
322​
323## 0.0.9
324​
325### Patch Changes
326​
327- Collections must have a getId function & use an id for update/delete operators ([#134](https://github.com/TanStack/db/pull/134))
328​
329- Switch to Collection options factories instead of extending the Collection class ([#145](https://github.com/TanStack/db/pull/145))
330​
331 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.
332​
333- 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)]:
334 - @tanstack/db-collections@0.0.7
335 - @tanstack/react-db@0.0.5
336​
337## 0.0.8
338​
339### Patch Changes
340​
341- Updated dependencies []:
342 - @tanstack/db-collections@0.0.6
343 - @tanstack/react-db@0.0.4
344​
345## 0.0.7
346​
347### Patch Changes
348​
349- Updated dependencies [[`0bbf4c4`](https://github.com/TanStack/db/commit/0bbf4c46e01b382a70a437f05dfc09c9ff749a15)]:
350 - @tanstack/db-collections@0.0.5
351​
352## 0.0.6
353​
354### Patch Changes
355​
356- Updated dependencies [[`2d0fcf1`](https://github.com/TanStack/db/commit/2d0fcf16a61a3fcd6a7220b5501640cc0f67218f)]:
357 - @tanstack/db-collections@0.0.4
358​
359## 0.0.5
360​
361### Patch Changes
362​
363- Updated dependencies []:
364 - @tanstack/db-collections@0.0.3
365 - @tanstack/react-db@0.0.3
366​
367## 0.0.4
368​
369### Patch Changes
370​
371- Updated dependencies [[`4c82edb`](https://github.com/TanStack/db/commit/4c82edb9547f26c9de44f5bf43d4385c38920672), [`4c82edb`](https://github.com/TanStack/db/commit/4c82edb9547f26c9de44f5bf43d4385c38920672)]:
372 - @tanstack/react-db@0.0.2
373 - @tanstack/db-collections@0.0.2
374​
375## 0.0.3
376​
377### Patch Changes
378​
379- Updated dependencies [[`b42479c`](https://github.com/TanStack/db/commit/b42479cf95f9a820b36e01684b13a9179973f3d8)]:
380 - @tanstack/react-db@0.0.3
381​
382## 0.0.2
383​
384### Patch Changes
385​
386- Updated dependencies [[`9bb6e89`](https://github.com/TanStack/db/commit/9bb6e8909cebdcd7c03091bfc12dd37f5ab2e1ea)]:
387 - @tanstack/react-db@0.0.2