@collective-intelligence/external-apps-client-sdk-react 0.1.24 → 0.1.26
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/README.md +11 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -125,8 +125,18 @@ without resubscribing. It receives the changes of the topic in batches: one
|
|
|
125
125
|
delivery per tab, 250 to 1000 ms after the first pending change, with the
|
|
126
126
|
latest change of each record.
|
|
127
127
|
|
|
128
|
+
Pass `onReset` to the client and refetch every realtime-driven query in it.
|
|
129
|
+
The client calls it when the server cannot replay a gap and once after a
|
|
130
|
+
stream opens without a last event id, the first one of each page included.
|
|
131
|
+
Without `onReset` the client cannot recover from such a gap, so a change can
|
|
132
|
+
be lost.
|
|
133
|
+
|
|
128
134
|
```tsx
|
|
129
|
-
|
|
135
|
+
// `queryClient` is the QueryClient of your realtime-driven queries.
|
|
136
|
+
const realtime = createRealtimeClient({
|
|
137
|
+
ticketUrl: "/api/realtime/ticket",
|
|
138
|
+
onReset: () => queryClient.invalidateQueries()
|
|
139
|
+
})
|
|
130
140
|
|
|
131
141
|
<RealtimeProvider client={realtime}>
|
|
132
142
|
<LeadBoard />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@collective-intelligence/external-apps-client-sdk-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "React bindings for Collective Intelligence external applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@collective-intelligence/external-apps-client-sdk": "0.1.
|
|
51
|
+
"@collective-intelligence/external-apps-client-sdk": "0.1.26",
|
|
52
52
|
"@collective-intelligence/ui-react": "0.1.22",
|
|
53
53
|
"@oxlint/plugins": "1.85.0",
|
|
54
54
|
"@tanstack/react-router": "1.170.30",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"vite": "8.2.1",
|
|
70
70
|
"vitest": "4.1.10"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "8200af5951cee11bdd23c59aba0709412aa8ea62"
|
|
73
73
|
}
|