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/framework/react/reference/useInfiniteQuery.md
+11-6
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ The options for `useInfiniteQuery` are identical to the [`useQuery` hook](../use
54
54
55
55
**Returns**
56
56
57
-
The returned properties for `useInfiniteQuery` are identical to the [`useQuery` hook](../useQuery), with the addition of the following and a small difference in `isRefetching`:
57
+
The returned properties for `useInfiniteQuery` are identical to the [`useQuery` hook](../useQuery), with the addition of the following properties and a small difference in `isRefetching` and `isRefetchError`:
58
58
59
59
-`data.pages: TData[]`
60
60
- Array containing all pages.
@@ -66,19 +66,24 @@ The returned properties for `useInfiniteQuery` are identical to the [`useQuery`
66
66
- Will be `true` while fetching the previous page with `fetchPreviousPage`.
- This function allows you to fetch the previous "page" of results.
75
74
-`options.cancelRefetch: boolean` same as for `fetchNextPage`.
76
75
-`hasNextPage: boolean`
77
-
-This will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option).
76
+
-Will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option).
78
77
-`hasPreviousPage: boolean`
79
-
- This will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option).
78
+
- Will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option).
79
+
-`isFetchNextPageError: boolean`
80
+
- Will be `true` if the query failed while fetching the next page.
81
+
-`isFetchPreviousPageError: boolean`
82
+
- Will be `true` if the query failed while fetching the previous page.
80
83
-`isRefetching: boolean`
81
-
-Is`true` whenever a background refetch is in-flight, which _does not_ include initial `pending` or fetching of next or previous page
84
+
-Will be`true` whenever a background refetch is in-flight, which _does not_ include initial `pending` or fetching of next or previous page
82
85
- Is the same as `isFetching && !isPending && !isFetchingNextPage && !isFetchingPreviousPage`
86
+
-`isRefetchError: boolean`
87
+
- Will be `true` if the query failed while refetching a page.
83
88
84
89
Keep in mind that imperative fetch calls, such as `fetchNextPage`, may interfere with the default refetch behaviour, resulting in outdated data. Make sure to call these functions only in response to user actions, or add conditions like `hasNextPage && !isFetching`.
0 commit comments