Description
react-infinite-scroll-component is an infinite scroll component for React, with zero runtime dependencies and about 4 kB gzipped. It uses IntersectionObserver to detect when the user reaches the end of a list and then calls a next function to load more items. It is TypeScript-first and works with React 17, 18 and 19. Three scroll modes are supported: the window itself, which suits feeds and product listings; a fixed-height container, for embedded lists and sidebars; and a custom scrollable parent, given as an element or an id. Pull-to-refresh is included, and there is an inverse scroll mode for chat and messaging interfaces, where the newest items are at the bottom. There are two APIs. The InfiniteScroll component handles the loader, an end message, pull-to-refresh and inverse scroll for most cases. The useInfiniteScroll hook is for custom markup, where the developer places a sentinel element at the end of the list and the hook calls next when it enters the viewport. The README includes recipes for Next.js App Router, TanStack Query and SWR. Its props include dataLength, which must change when new items arrive, and hasMore. It suits React developers who need to page through long lists without writing the scroll logic themselves.…
Highlights
- IntersectionObserver-based loading
- Window, fixed-height and custom container modes
- Pull-to-refresh and inverse chat scroll
- Component and hook APIs
Ratings & Reviews
No ratings yet
Be the first to rate react-infinite-scroll-component.
People also visit
react-infinite-scroll-component FAQ
What does react-infinite-scroll-component do?
It loads more items as the user scrolls to the end of a list, using IntersectionObserver.
Which React versions does it support?
React 17, 18 and 19, according to the README.
Which scroll modes can I use?
The window itself, a fixed-height container, or a custom scrollable parent. There is also an inverse mode for chat.
Does it have dependencies?
The README says it has zero runtime dependencies and is about 4 kB gzipped.
Does it work with Next.js?
Yes. The README has an App Router recipe, and it works with TanStack Query and SWR as well.
What are the best react-infinite-scroll-component alternatives?
Popular alternatives to react-infinite-scroll-component include react-infinite, react-infinite-scroll-hook and react-list. See all react-infinite-scroll-component alternatives



















