/// interface State { inView: boolean; entry: IntersectionObserverEntry | null; observer: IntersectionObserver | null; } export interface Options extends IntersectionObserverInit { unobserveOnEnter?: boolean; /** * @deprecated Use setRef callback. */ target?: React.RefObject; /** * @deprecated Use hook `useInViewEffect` to access observer callback. */ onEnter?: (entry: IntersectionObserverEntry, observer: IntersectionObserver) => void; /** * @deprecated Use hook `useInViewEffect` to access observer callback. */ onLeave?: (entry: IntersectionObserverEntry, observer: IntersectionObserver) => void; /** * Default `inView` state */ defaultInView?: boolean; } interface UseInView { (options?: Options, externalState?: React.ComponentState[]): [ (node: Element | null) => void, State["inView"], State["entry"], State["observer"] ]; } /** * useInView * @param options IntersectionObserverInit * @param externalState React.ComponentState[] */ declare const useInView: UseInView; export default useInView;