UseReactorSuspenseInfiniteQueryParameters
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:32
Parameters for useActorSuspenseInfiniteQuery hook. Extends react-query’s UseSuspenseInfiniteQueryOptions with custom reactor params.
Extends
Section titled “Extends”Omit<UseSuspenseInfiniteQueryOptions<ReactorQueryData<ReactorReturnOk<Service,Method,Transform>>,ReactorReturnErr<Service,Method,Transform>,Selected,QueryKey,TPageParam>,"queryKey"|"queryFn"|"getNextPageParam"|"initialPageParam">
Type Parameters
Section titled “Type Parameters”Service
Section titled “Service”Service
Method
Section titled “Method”Method extends FunctionName<Service>
Transform
Section titled “Transform”Transform extends TransformKey = "candid"
TPageParam
Section titled “TPageParam”TPageParam = unknown
Selected
Section titled “Selected”Selected = InfiniteData<ReactorQueryData<ReactorReturnOk<Service, Method, Transform>>, TPageParam>
Properties
Section titled “Properties”reactor
Section titled “reactor”reactor:
Reactor<Service,Transform>
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:52
The reactor instance to use for method calls
functionName
Section titled “functionName”functionName:
Method
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:54
The method name to call on the canister
getArgs
Section titled “getArgs”getArgs: (
pageParam) =>ReactorArgs<Service,Method,Transform>
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:56
Function to get args from page parameter
Parameters
Section titled “Parameters”pageParam
Section titled “pageParam”TPageParam
Returns
Section titled “Returns”ReactorArgs<Service, Method, Transform>
getKeyArgs?
Section titled “getKeyArgs?”
optionalgetKeyArgs?: (args) =>unknown
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:68
Narrows what the cache key derives from the call arguments.
By default the key is scoped by getArgs(initialPageParam), so two
infinite queries on the same method with different arguments stay in
separate cache entries. Supply this when those args embed the cursor and
only part of them identifies the query — return the stable, serializable
portion (typically everything except the pagination field). It is required
when initialPageParam changes between renders, as Date.now() does:
without it every render keys a new query.
Parameters
Section titled “Parameters”ReactorArgs<Service, Method, Transform>
Returns
Section titled “Returns”unknown
callConfig?
Section titled “callConfig?”
optionalcallConfig?:CallConfig
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:70
Agent call configuration (effectiveCanisterId, etc.)
queryKey?
Section titled “queryKey?”
optionalqueryKey?: readonlyunknown[]
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:72
Custom query key (auto-generated if not provided)
initialPageParam
Section titled “initialPageParam”initialPageParam:
TPageParam
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:74
Initial page parameter
getNextPageParam
Section titled “getNextPageParam”getNextPageParam: (
lastPage,allPages,lastPageParam,allPageParams) =>TPageParam|null|undefined
Defined in: react/src/hooks/useActorSuspenseInfiniteQuery.ts:76
Function to determine next page parameter
Parameters
Section titled “Parameters”lastPage
Section titled “lastPage”ReactorQueryData<ReactorReturnOk<Service, Method, Transform>>
allPages
Section titled “allPages”ReactorQueryData<ReactorReturnOk<Service, Method, Transform>>[]
lastPageParam
Section titled “lastPageParam”TPageParam
allPageParams
Section titled “allPageParams”TPageParam[]
Returns
Section titled “Returns”TPageParam | null | undefined