rememberInfinityPagedComponentContext

fun <T> rememberInfinityPagedComponentContext(    size: Int,     page: Int = 0,     scope: CoroutineScope = rememberCoroutineScope(),     doReloadInInit: Boolean = true,     loader: suspend InfinityPagedComponentContext<T>.(Pagination) -> PaginationResult<T>): InfinityPagedComponentContext<T>(source)

Creates and remembers an InfinityPagedComponentContext for managing infinite pagination in a Compose UI. This function is used to create a persistent pagination context that survives recompositions.

Return

An InfinityPagedComponentContext instance that manages the pagination state and operations.

Parameters

size

Number of items to load per page.

page

Initial page number to start pagination from (defaults to 0).

scope

CoroutineScope to launch pagination operations in. If not provided, a new scope will be created using rememberCoroutineScope.

loader

Suspended function that loads paginated data. Receives the current pagination context and pagination parameters, and returns a PaginationResult containing the loaded data.