@tanstack/solid-db 0.2.33 → 0.2.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-db",
3
- "version": "0.2.33",
3
+ "version": "0.2.34",
4
4
  "description": "Solid integration for @tanstack/db",
5
5
  "author": "Kyle Mathews",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@solid-primitives/map": "^0.7.2",
40
- "@tanstack/db": "0.7.1"
40
+ "@tanstack/db": "0.7.2"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "solid-js": ">=1.9.0"
@@ -5,12 +5,13 @@ description: >
5
5
  doubles as data access (call as function) with state/status properties.
6
6
  Fine-grained reactivity: signal reads MUST happen inside the query function
7
7
  for tracking. Config passed as Accessor (() => config). Built-in Suspense
8
- support via createResource. ReactiveMap for state. Import from
8
+ support via createResource and errors through Solid ErrorBoundary.
9
+ ReactiveMap for state. Import from
9
10
  @tanstack/solid-db (re-exports all of @tanstack/db).
10
11
  type: framework
11
12
  library: db
12
13
  framework: solid
13
- library_version: '0.6.0'
14
+ library_version: '0.6.17'
14
15
  requires:
15
16
  - db-core
16
17
  sources:
@@ -26,7 +27,7 @@ This skill builds on db-core. Read it first for collection setup, query builder,
26
27
 
27
28
  ```tsx
28
29
  import { useLiveQuery, eq, not } from '@tanstack/solid-db'
29
- import { For, Show, Suspense } from 'solid-js'
30
+ import { ErrorBoundary, For, Show, Suspense } from 'solid-js'
30
31
 
31
32
  function TodoList() {
32
33
  const todosQuery = useLiveQuery((q) =>
@@ -131,12 +132,16 @@ return <Show when={userQuery()}>{(user) => <div>{user().name}</div>}</Show>
131
132
  ### Suspense integration
132
133
 
133
134
  ```tsx
134
- <Suspense fallback={<div>Loading...</div>}>
135
- <For each={todosQuery()}>{(todo) => <li>{todo.text}</li>}</For>
136
- </Suspense>
135
+ <ErrorBoundary fallback={(error) => <div>{error.message}</div>}>
136
+ <Suspense fallback={<div>Loading...</div>}>
137
+ <For each={todosQuery()}>{(todo) => <li>{todo.text}</li>}</For>
138
+ </Suspense>
139
+ </ErrorBoundary>
137
140
  ```
138
141
 
139
- `useLiveQuery` integrates with Solid's `createResource` — wrap in `<Suspense>` for loading states.
142
+ `useLiveQuery` integrates with Solid's `createResource`. Use `<Suspense>` for
143
+ loading and `<ErrorBoundary>` for errors. Reading an errored query throws
144
+ through the resource, so do not rely on reading `isError` after failure.
140
145
 
141
146
  ## Includes (Hierarchical Data)
142
147