You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/services/use-find.md
+88-1Lines changed: 88 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,8 @@ troubleshoot reactivity.
86
86
happens whenever a `created`, `updated`, or `removed` event is provided. This will potentially be refined in the
87
87
future.
88
88
- when set to `'hybrid'`, you get server-side pagination with live lists. This will likely become the default in
89
-
the future.
89
+
the future. **Important**: Hybrid pagination requires that your frontend and backend data structures match exactly.
90
+
See [Hybrid Paging with Live Lists](#hybrid-paging-with-live-lists) for details and limitations.
90
91
-**`pagination` {Object}** an object containing two refs: `$limit` and `$skip`. This allows you to synchronize the
91
92
internally-controlled pagination with UI-bound `$limit` and `$skip` properties.
92
93
-**`immediate` {boolean = true}** when `paginateOn: 'server'` is set, by default it will make an initial request. Set
@@ -227,3 +228,89 @@ await posts$.next()
227
228
// move to the previous page
228
229
awaitposts$.prev()
229
230
```
231
+
232
+
### Hybrid Paging with Live Lists
233
+
234
+
Hybrid pagination combines server-side pagination with live-updating lists. It provides the best of both worlds by fetching paginated data from the server while maintaining reactive updates from real-time events.
// move to the previous page (fetches from server)
246
+
awaitposts$.prev()
247
+
```
248
+
249
+
#### Important Limitation: Data Structure Consistency
250
+
251
+
<BlockQuotetype="warning">
252
+
253
+
**Hybrid pagination only works correctly when your frontend and backend data structures match exactly.** If your backend returns populated/joined data that differs from what's stored in your frontend service store, you may encounter issues where `useFind` returns only IDs or totals without the actual items.
This approach gives you full control over data fetching and transformation while still allowing you to use `findInStore` for local querying when needed.
0 commit comments