Skip to content
Source
Sign inSign up
TanStack/query

API doc typo for useQuery param: 'pagination' -> 'paginated' #29

Mergedchoznerol(GitHub profile, opens in a new tab)merged 1 commit intomaster fromrefs/pull/29/headmerged by tannerlinsley View on GitHub

Showing 1 changed file with 9 additions and 9 deletions.

x
0 of 1 viewed, 1 left
9 additions and 9 deletionsREADME.mdModified
View file
@@ -1117,13 +1117,13 @@
failureCount,
isLoading,
refetch,
- // with pagination mode enabled
+ // with paginated mode enabled
isFetchingMore,
canFetchMore,
fetchMore,
} = useQuery(queryKey, queryFn, {
manual,
- pagination,
+ paginated,
getCanFetchMore,
staleTime,
retry,
@@ -1153,15 +1153,15 @@
- The function that the query will use to request data
- Optionally receives the `variables` object passed from either the query key tuple (`useQuery(['todos', variables], queryFn)`) or the `refetch` method's `variables` option, eg. `refetch({ variables })`
- Must return a promise that will either resolves data or throws an error.
-- `pagination: Boolean`
- - Set this to `true` to enable pagination mode
+- `paginated: Boolean`
+ - Set this to `true` to enable `paginated` mode
- In this mode, new pagination utilities are returned from `useQuery` and `data` becomes an array of page results
- `manual: Boolean`
- Set this to `true` to disable automatic refetching when the query mounts or changes query keys.
- To refetch the query, use the `refetch` method returned from the `useQuery` instance.
- `getCanFetchMore: Function(lastPage, allPages) => Boolean`