1.0.0 • Published 7 years ago

react-finite v1.0.0

Weekly downloads
1
License
BSD-3-Clause
Repository
-
Last release
7 years ago

ReactFinite

React finite is a simple React component leveraging the power of the IntersectionObserver API to reduce the number of the DOM elements your React app renders. You can find an example here.

Usage:

<ReactFinite 
  initialNumberOfDisplayedChildren={20}
  safetyMarginInPixels={600} // Optional
  useWindowForVisibilityDetection={false} // Optional
  className="list" // Optional
>
  {list.map((listElement, i) => 
    <div key={i} className={`listElement ${i % 2 === 0 ? "listEven" : "listOdd"}`}>
      {i}: {listElement.text}
    </div>
  )}
</ReactFinite>