Skip to content

UseInfiniteScrollResult

UseInfiniteScrollResult<T> = object

Defined in: packages/pagination/src/use-infinite-scroll.ts:22

Return value of the useInfiniteScroll hook.

T

The item type in the paginated list.

hasMore: boolean

Defined in: packages/pagination/src/use-infinite-scroll.ts:28

true if there are more pages to fetch.


isLoading: boolean

Defined in: packages/pagination/src/use-infinite-scroll.ts:30

true while a page fetch is in flight.


items: T[]

Defined in: packages/pagination/src/use-infinite-scroll.ts:24

Accumulated, deduplicated items from all loaded pages.


sentinelRef: RefObject<Element | null>

Defined in: packages/pagination/src/use-infinite-scroll.ts:26

Ref to attach to a sentinel DOM element. Loading triggers when it enters the viewport.