• Hook detecting if a component is visible and firing an event if a hidden component is to be rendered.

    Type Parameters

    • T extends Element

      type of component to observe

    Parameters

    • ref: MutableRefObject<T>

      ref of component to observe

    • Optional notifyIntersectionChange: (() => void)

      event fired when visible state of component changes

        • (): void
        • Returns void

    • Optional rootMargin: string = '0px'

      intersection buffer for accuracy

    Returns {
        isIntersecting: boolean;
    }

    • isIntersecting: boolean

    Export

Generated using TypeDoc