From a5ba29ff6e8d2d63a4d95b15ca46b6b9cb2f3fcc Mon Sep 17 00:00:00 2001 From: Allan Lopez Date: Mon, 28 Nov 2022 16:49:20 -0600 Subject: [PATCH] docs(useInfiniteQuery): add isRefetching to returned properties docs --- docs/reference/useInfiniteQuery.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/reference/useInfiniteQuery.md b/docs/reference/useInfiniteQuery.md index 2f1946816b..134d1e89c8 100644 --- a/docs/reference/useInfiniteQuery.md +++ b/docs/reference/useInfiniteQuery.md @@ -23,7 +23,7 @@ const { **Options** -The options for `useInfiniteQuery` are identical to the [`useQuery` hook](../reference/useQuery) with the addition of the following and a small difference in `isRefetching`: +The options for `useInfiniteQuery` are identical to the [`useQuery` hook](../reference/useQuery) with the addition of the following: - `queryFn: (context: QueryFunctionContext) => Promise` - **Required, but only if no default query function has been defined** [`defaultQueryFn`](../guides/default-query-function) @@ -39,13 +39,10 @@ The options for `useInfiniteQuery` are identical to the [`useQuery` hook](../ref - When new data is received for this query, this function receives both the first page of the infinite list of data and the full array of all pages. - It should return a **single variable** that will be passed as the last optional parameter to your query function. - Return `undefined` to indicate there is no previous page available. -- `isRefetching: boolean` - - Is `true` whenever a background refetch is in-flight, which _does not_ include initial `loading` or fetching of next or previous page - - Is the same as `isFetching && !isLoading && !isFetchingNextPage && !isFetchingPreviousPage` **Returns** -The returned properties for `useInfiniteQuery` are identical to the [`useQuery` hook](../reference/useQuery), with the addition of the following: +The returned properties for `useInfiniteQuery` are identical to the [`useQuery` hook](../reference/useQuery), with the addition of the following and a small difference in `isRefetching`: - `data.pages: TData[]` - Array containing all pages. @@ -69,3 +66,6 @@ The returned properties for `useInfiniteQuery` are identical to the [`useQuery` - This will be `true` if there is a next page to be fetched (known via the `getNextPageParam` option). - `hasPreviousPage: boolean` - This will be `true` if there is a previous page to be fetched (known via the `getPreviousPageParam` option). +- `isRefetching: boolean` + - Is `true` whenever a background refetch is in-flight, which _does not_ include initial `loading` or fetching of next or previous page + - Is the same as `isFetching && !isLoading && !isFetchingNextPage && !isFetchingPreviousPage` \ No newline at end of file