UNPKG

@wcdw3/lazy-render

Version:

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

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