useInfiniteScroll()
function useInfiniteScroll<T>(EntityType, options): InfiniteScrollResource<InstanceType<T>>;
Defined in: useInfiniteScroll.ts:33
Infinite scroll hook for cursor-based pagination
Type Parameters
| Type Parameter |
|---|
T extends EntityType |
Parameters
| Parameter | Type | Description |
|---|---|---|
EntityType | T | The entity class |
options | UseOptions<EntityStaticType<T, "findByCursorOptions">> | Query options with cursor pagination |
Returns
InfiniteScrollResource<InstanceType<T>>
A resource object with infinite scroll controls
Example
const resource = useInfiniteScroll(Todo, {
where: { completed: false },
orderBy: [{ field: 'createdAt', sort: 'desc' }],
limit: 50
});