File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,13 @@ const {
2424The options for ` useInfiniteQuery ` are identical to the [ ` useQuery ` hook] ( /reference/useQuery ) with the addition of the following:
2525
2626- ` queryFn: (context: QueryFunctionContext) => Promise<TData> `
27- - ** Required, but only if no default query function has been defined**
27+ - ** Required, but only if no default query function has been defined** [ ` defaultQueryFn ` ] ( /guides/default-query-function )
2828 - The function that the query will use to request data.
2929 - Receives a ` QueryFunctionContext ` object with the following variables:
3030 - ` queryKey: QueryKey `
3131 - ` pageParam: unknown | undefined `
3232 - Must return a promise that will either resolves data or throws an error.
33+ - Make sure you return the data * and* the ` pageParam ` if needed for use in the props below.
3334- ` getNextPageParam: (lastPage, allPages) => unknown | undefined `
3435 - When new data is received for this query, this function receives both the last page of the infinite list of data and the full array of all pages.
3536 - It should return a ** single variable** that will be passed as the last optional parameter to your query function.
You can’t perform that action at this time.
0 commit comments