/LazyRender

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

Primary LanguageJavaScriptMIT LicenseMIT

LazyRender

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

Install

npm i -S react-intersection-observer @wcdw3/lazy-render

Usage

Edit @wcdw3/LazyRender Example

import LazyRender from '@wcdw3/lazy-render';

const Foo = () => {
  return (
    <LazyRender fallback={<div>Loading...</div>}>
      <div>ta-da 🎉</div>
    </LazyRender>
  );
};