UNPKG

@wcdw3/lazy-render

Version:

uses react-intersection-observer to render components when they appear on the screen.

14 lines (11 loc) 386 B
import React from 'react'; interface LazyRenderProps { children: React.ReactNode; fallback: React.ReactNode; forceView?: boolean; rootMargin?: string; triggerOnce?: boolean; threshold?: number; } declare function LazyRender({ children, fallback, rootMargin, threshold, forceView, triggerOnce }: LazyRenderProps): JSX.Element; export { LazyRender as default };