Skip to content

Commit 89d1694

Browse files
committed
docs: update comparison
Closes #920
1 parent b3c9ce8 commit 89d1694

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/src/pages/docs/comparison.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ Feature/Capability Key:
2626
| Polling/Intervals ||||
2727
| Parallel Queries ||||
2828
| Dependent Queries ||||
29-
| Paginated Queries || 🛑<sup>1</sup> ||
29+
| Paginated Queries || ||
3030
| Infinite Queries ||||
31+
| Lagged Queries<sup>1</sup> || 🛑 | 🛑 |
3132
| Initial Data ||||
3233
| Scroll Recovery ||||
3334
| Cache Manipulation ||||
@@ -47,7 +48,7 @@ Feature/Capability Key:
4748

4849
### Notes
4950

50-
> **<sup>1</sup> Paginated Queries in SWR are not "lazy"** - While React Query provides a way to continue to see an existing pages data while the next page loads, SWR uses component styling/visibility to only prefetch the next page and does not provide the capability to "lag" previous query results while new ones load without much non-trivial hackery.
51+
> **<sup>1</sup> "Lagged" Queries** - React Query provides a way to continue to see an existing query's data while the next query loads (similar to the same UX that suspense will soon provide natively). This is extremely important when writing pagination UIs or infinite loading UIs where you do not want to show a hard loading state whenever a new query is requested. Other libraries do not have this capability and render a hard loading state for the new query (unless it has been prefetched), while the new query loads.
5152
5253
> **<sup>2</sup> Partial query matching** - Because React Query uses deterministic query key serialization, this allows you to manipulate variable groups of queries without having to know each individual query-key that you want to match, eg. you can refetch every query that starts with `todos` in its key, regardless of variables, or you can target specific queries with (or without) variables or nested properties, and even use a filter function to only match queries that pass your specific conditions.
5354

0 commit comments

Comments
 (0)