UNPKG

react-use-infinite-loading

Version:

Infinite scroll hook for React. Supports multiple scroll directions.

10 lines (9 loc) 339 B
interface Props { callback: (page: number) => void; hasMore: boolean; startPage: number; direction?: 'bottom' | 'top'; offset: number; } export declare const useInfiniteScroll: ({ callback, hasMore, startPage, offset, direction }: Props) => (boolean | ((node?: HTMLElement | undefined) => void))[]; export {};