Function useCursorPaginator
- useCursorPaginator<Data>(__namedParameters): {
data: Data[];
error: boolean;
hasMore: boolean;
lastCursor: any;
loading: boolean;
onSkip: IExecute<void, boolean>;
reloadSubject: Subject<void>;
setData: ((data: Data[] | ((prevData: Data[]) => Data[])) => void);
} Type Parameters
- Data extends unknown = any
Parameters
- __namedParameters: IParams<Data>
Returns {
data: Data[];
error: boolean;
hasMore: boolean;
lastCursor: any;
loading: boolean;
onSkip: IExecute<void, boolean>;
reloadSubject: Subject<void>;
setData: ((data: Data[] | ((prevData: Data[]) => Data[])) => void);
}
- An object containing the paginator data and functions.
error: boolean
hasMore: boolean
lastCursor: any
loading: boolean
onSkip: IExecute<void, boolean>
reloadSubject: Subject<void>
setData: ((data: Data[] | ((prevData: Data[]) => Data[])) => void)
A function that handles pagination using cursor-based pagination technique.