Skip to content

Commit 2b03f94

Browse files
committed
Fixes to example
1 parent ebaf016 commit 2b03f94

12 files changed

Lines changed: 25 additions & 31 deletions

File tree

docs/collection-options-creator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Every collection options creator must implement these key responsibilities:
3232
Define a configuration interface that extends or includes standard collection properties:
3333

3434
```typescript
35-
// Pattern A: User provides handlers (Query / Electric SQL style)
35+
// Pattern A: User provides handlers (Query / ElectricSQL style)
3636
interface MyCollectionConfig<TItem extends object> {
3737
// Your sync engine specific options
3838
connectionUrl: string
@@ -155,7 +155,7 @@ interface MyCollectionConfig<TItem, TRecord> {
155155

156156
There are two distinct patterns for handling mutations in collection options creators:
157157

158-
#### Pattern A: User-Provided Handlers (Electric SQL, Query)
158+
#### Pattern A: User-Provided Handlers (ElectricSQL, Query)
159159

160160
The user provides mutation handlers in the config. Your collection creator passes them through:
161161

examples/react/todo/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
- Move Collections to their own packages ([#252](https://github.com/TanStack/db/pull/252))
116116

117117
- Move local-only and local-storage collections to main `@tanstack/db` package
118-
- Create new `@tanstack/electric-db-collection` package for Electric SQL integration
118+
- Create new `@tanstack/electric-db-collection` package for ElectricSQL integration
119119
- Create new `@tanstack/query-db-collection` package for TanStack Query integration
120120
- Delete `@tanstack/db-collections` package (removed from repo)
121121
- Update example app and documentation to use new package structure

examples/react/todo/src/routes/__root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const Route = createRootRoute({
1818
content: `width=device-width, initial-scale=1`,
1919
},
2020
{
21-
title: `TanStack DB Example`,
21+
title: `TanStack React DB Example`,
2222
},
2323
],
2424
links: [

examples/react/todo/src/routes/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ function HomePage() {
99
<div className="min-h-screen flex items-center justify-center bg-gray-50">
1010
<div className="max-w-md w-full bg-white rounded-lg shadow-lg p-8">
1111
<h1 className="text-3xl font-bold text-center mb-8 text-gray-800">
12-
TanStack DB Demo
12+
TanStack React DB Demo
1313
</h1>
1414

1515
<p className="text-gray-600 text-center mb-8">
16-
Choose a collection type to see how TanStack DB works with different
17-
data sources:
16+
Choose a collection type to see how TanStack React DB works with
17+
different data sources:
1818
</p>
1919

2020
<div className="space-y-4">
@@ -30,7 +30,7 @@ function HomePage() {
3030
<button className="w-full px-6 py-4 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors text-left">
3131
<div className="font-semibold">Electric Collections</div>
3232
<div className="text-sm opacity-90 mt-1">
33-
Real-time sync with Electric SQL
33+
Real-time sync with ElectricSQL
3434
</div>
3535
</button>
3636
</Link>
@@ -45,8 +45,8 @@ function HomePage() {
4545
</div>
4646

4747
<div className="mt-8 text-xs text-center text-gray-500">
48-
Both examples use the same API and UI components, showcasing the
49-
unified interface of TanStack DB.
48+
All examples use the same API and UI components, showcasing the
49+
unified interface of TanStack React DB.
5050
</div>
5151
</div>
5252
</div>

examples/solid/todo/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
- Move Collections to their own packages ([#252](https://github.com/TanStack/db/pull/252))
6666

6767
- Move local-only and local-storage collections to main `@tanstack/db` package
68-
- Create new `@tanstack/electric-db-collection` package for Electric SQL integration
68+
- Create new `@tanstack/electric-db-collection` package for ElectricSQL integration
6969
- Create new `@tanstack/query-db-collection` package for TanStack Query integration
7070
- Delete `@tanstack/db-collections` package (removed from repo)
7171
- Update example app and documentation to use new package structure

examples/solid/todo/src/routes/__root.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
import {
2-
HeadContent,
3-
Outlet,
4-
Scripts,
5-
createRootRoute,
6-
} from "@tanstack/solid-router"
1+
import { Outlet, createRootRoute } from "@tanstack/solid-router"
72

83
import appCss from "../styles.css?url"
9-
import { ParentProps } from "solid-js"
104

115
export const Route = createRootRoute({
126
head: () => ({
@@ -19,7 +13,7 @@ export const Route = createRootRoute({
1913
content: `width=device-width, initial-scale=1`,
2014
},
2115
{
22-
title: `TanStack DB Example`,
16+
title: `TanStack Solid DB Example`,
2317
},
2418
],
2519
links: [

examples/solid/todo/src/routes/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ function HomePage() {
99
<div class="min-h-screen flex items-center justify-center bg-gray-50">
1010
<div class="max-w-md w-full bg-white rounded-lg shadow-lg p-8">
1111
<h1 class="text-3xl font-bold text-center mb-8 text-gray-800">
12-
TanStack DB Demo
12+
TanStack Solid DB Demo
1313
</h1>
1414

1515
<p class="text-gray-600 text-center mb-8">
16-
Choose a collection type to see how TanStack DB works with different
17-
data sources:
16+
Choose a collection type to see how TanStack Solid DB works with
17+
different data sources:
1818
</p>
1919

2020
<div class="space-y-4">
@@ -30,7 +30,7 @@ function HomePage() {
3030
<button class="w-full px-6 py-4 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors text-left">
3131
<div class="font-semibold">Electric Collections</div>
3232
<div class="text-sm opacity-90 mt-1">
33-
Real-time sync with Electric SQL
33+
Real-time sync with ElectricSQL
3434
</div>
3535
</button>
3636
</Link>
@@ -45,8 +45,8 @@ function HomePage() {
4545
</div>
4646

4747
<div class="mt-8 text-xs text-center text-gray-500">
48-
Both examples use the same API and UI components, showcasing the
49-
unified interface of TanStack DB.
48+
All examples use the same API and UI components, showcasing the
49+
unified interface of TanStack Solid DB.
5050
</div>
5151
</div>
5252
</div>

packages/db/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
- Sync implementation patterns with transaction lifecycle (begin, write, commit, markReady)
186186
- Data parsing and type conversion using field-specific conversions
187187
- Two distinct mutation handler patterns:
188-
- Pattern A: User-provided handlers (Electric SQL, Query style)
188+
- Pattern A: User-provided handlers (ElectricSQL, Query style)
189189
- Pattern B: Built-in handlers (Trailbase, WebSocket style)
190190
- Complete WebSocket collection example with full round-trip flow
191191
- Managing optimistic state with various strategies (transaction IDs, ID-based tracking, refetch, timestamps)
@@ -268,7 +268,7 @@
268268
- Move Collections to their own packages ([#252](https://github.com/TanStack/db/pull/252))
269269

270270
- Move local-only and local-storage collections to main `@tanstack/db` package
271-
- Create new `@tanstack/electric-db-collection` package for Electric SQL integration
271+
- Create new `@tanstack/electric-db-collection` package for ElectricSQL integration
272272
- Create new `@tanstack/query-db-collection` package for TanStack Query integration
273273
- Delete `@tanstack/db-collections` package (removed from repo)
274274
- Update example app and documentation to use new package structure

packages/electric-db-collection/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
- Move Collections to their own packages ([#252](https://github.com/TanStack/db/pull/252))
210210

211211
- Move local-only and local-storage collections to main `@tanstack/db` package
212-
- Create new `@tanstack/electric-db-collection` package for Electric SQL integration
212+
- Create new `@tanstack/electric-db-collection` package for ElectricSQL integration
213213
- Create new `@tanstack/query-db-collection` package for TanStack Query integration
214214
- Delete `@tanstack/db-collections` package (removed from repo)
215215
- Update example app and documentation to use new package structure

packages/electric-db-collection/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tanstack/electric-db-collection",
3-
"description": "Electric SQL collection for TanStack DB",
3+
"description": "ElectricSQL collection for TanStack DB",
44
"version": "0.0.14",
55
"dependencies": {
66
"@electric-sql/client": "1.0.0",

0 commit comments

Comments
 (0)