RE

React Infinite Scroll Component

react-infinite-scroll-component

Infinite scroll component for React. Zero runtime dependencies, IntersectionObserver-based, TypeScript-first. Window scroll, fixed-height, and custom container modes. Pull-to-refresh and inverse (chat) scroll included.

Hooks
react
infinite-scroll
infinite
scroll
component
react-component
typescript
hooks
react-hooks
intersectionobserver
Stars
3.1k
Weekly
869k
Open issues
136
Bundle
~25 kB

Installation

npm install react-infinite-scroll-component

Code example

import { useInfiniteScrollComponent } from "react-infinite-scroll-component";

export function Example() {
  const value = useInfiniteScrollComponent();
  return <p>{String(value)}</p>;
}

Pros & cons

Pros

  • Actively maintained by Ankeet Maini
  • 869k weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~25 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 136 open issues on GitHub

FAQs

Alternatives & similar libraries