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
Make sure to always keep the same data structure of pages and pageParams!
190
+
191
+
192
+
[//]: #'Example8'
193
+
180
194
## What if I want to limit the number of pages?
181
195
182
196
In some use cases you may want to limit the number of pages stored in the query data to improve the performance and UX:
@@ -188,7 +202,7 @@ The solution is to use a "Limited Infinite Query". This is made possible by usin
188
202
189
203
In the following example only 3 pages are kept in the query data pages array. If a refetch is needed, only 3 pages will be refetched sequentially.
190
204
191
-
[//]: #'Example7'
205
+
[//]: #'Example8'
192
206
193
207
```tsx
194
208
useInfiniteQuery({
@@ -205,7 +219,7 @@ useInfiniteQuery({
205
219
206
220
If your API doesn't return a cursor, you can use the `pageParam` as a cursor. Because `getNextPageParam` and `getPreviousPageParam` also get the `pageParam`of the current page, you can use it to calculate the next / previous page param.
Copy file name to clipboardExpand all lines: docs/vue/devtools.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Wave your hands in the air and shout hooray because Vue Query comes with dedicat
7
7
8
8
When you begin your Vue Query journey, you'll want these devtools by your side. They help visualize all of the inner workings of Vue Query and will likely save you hours of debugging if you find yourself in a pinch!
9
9
10
-
The only thing you need to do is to install official **[Vue Devtools](https://devtools.vuejs.org/guide/installation.html)**
10
+
The only thing you need to do is to install the official **[Vue Devtools](https://devtools.vuejs.org/guide/installation.html)**.
11
11
12
-
Vue Query will seemingly integrate with official devtools, adding custom inspector and timeline events.
13
-
Devtools would be treeshaken from production bundles by default.
12
+
Vue Query will seamlessly integrate with the official devtools, adding custom inspector and timeline events.
13
+
Devtool code will be treeshaken from production bundles by default.
0 commit comments