UNPKG

react-use-sticky

Version:

Observe when DOM element enters or leaves sticky state

6 lines (5 loc) 206 B
/// <reference types="react" /> /** * Returns a ref, and a stateful value bound to the ref */ export declare function useSticky<T extends HTMLElement>(): readonly [import("react").RefObject<T>, boolean];