Skip to content
Function

useInfiniteScroll

Fire a callback when a sentinel element scrolls into view.

See useInfiniteScroll with a live demo

@danixsoft/hooks


useInfiniteScroll<T>(callback, options?): RefObject<T>

Type Parameters

T

T extends HTMLElement

Parameters

callback

() => void

options?

IntersectionObserverInit = ...

Returns

RefObject<T>