Gathering detailed insights and metrics for react-infinite-scroller
Gathering detailed insights and metrics for react-infinite-scroller
Gathering detailed insights and metrics for react-infinite-scroller
Gathering detailed insights and metrics for react-infinite-scroller
@types/react-infinite-scroller
TypeScript definitions for react-infinite-scroller
react-infinite-viewer
React Infinite Viewer is Document Viewer Component with infinite scrolling.
react-infinite-grid-scroller
infinite vertical or horizontal scroll using css grid layout
react-super-infinite-scroller
An Infinite Scroll component for React using Intersection Observer API.
⏬ Infinite scroll component for React in ES6
npm install react-infinite-scroller
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3,301 Stars
257 Commits
513 Forks
21 Watchers
2 Branches
1 Contributors
Updated on Jun 30, 2025
Latest Version
1.2.6
Package Id
react-infinite-scroller@1.2.6
Unpacked Size
29.54 kB
Size
8.36 kB
File Count
13
NPM Version
6.14.13
Node Version
14.17.2
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
1
28
Infinitely load a grid or list of items in React. This component allows you to create a simple, lightweight infinite scrolling page or element by supporting both window and scrollable elements.
npm install react-infinite-scroller --save
yarn add react-infinite-scroller
1import InfiniteScroll from 'react-infinite-scroller';
1<InfiniteScroll 2 pageStart={0} 3 loadMore={loadFunc} 4 hasMore={true || false} 5 loader={<div className="loader" key={0}>Loading ...</div>} 6> 7 {items} // <-- This is the content you want to load 8</InfiniteScroll>
1<div style="height:700px;overflow:auto;"> 2 <InfiniteScroll 3 pageStart={0} 4 loadMore={loadFunc} 5 hasMore={true || false} 6 loader={<div className="loader" key={0}>Loading ...</div>} 7 useWindow={false} 8 > 9 {items} 10 </InfiniteScroll> 11</div>
You can define a custom parentNode
element to base the scroll calulations on.
1<div style="height:700px;overflow:auto;" ref={(ref) => this.scrollParentRef = ref}> 2 <div> 3 <InfiniteScroll 4 pageStart={0} 5 loadMore={loadFunc} 6 hasMore={true || false} 7 loader={<div className="loader" key={0}>Loading ...</div>} 8 useWindow={false} 9 getScrollParent={() => this.scrollParentRef} 10 > 11 {items} 12 </InfiniteScroll> 13 </div> 14</div>
Name | Required | Type | Default | Description |
---|---|---|---|---|
children | Yes | Node | Anything that can be rendered (same as PropType's Node) | |
loadMore | Yes | Function | A callback when more items are requested by the user. Receives a single parameter specifying the page to load e.g. function handleLoadMore(page) { /* load more items here */ } } | |
element | Component | 'div' | Name of the element that the component should render as. | |
hasMore | Boolean | false | Whether there are more items to be loaded. Event listeners are removed if false . | |
initialLoad | Boolean | true | Whether the component should load the first set of items. | |
isReverse | Boolean | false | Whether new items should be loaded when user scrolls to the top of the scrollable area. | |
loader | Component | A React component to render while more items are loading. The parent component must have a unique key prop. | ||
pageStart | Number | 0 | The number of the first page to load, With the default of 0 , the first page is 1 . | |
getScrollParent | Function | Override method to return a different scroll listener if it's not the immediate parent of InfiniteScroll. | ||
threshold | Number | 250 | The distance in pixels before the end of the items that will trigger a call to loadMore . | |
useCapture | Boolean | false | Proxy to the useCapture option of the added event listeners. | |
useWindow | Boolean | true | Add scroll listeners to the window, or else, the component's parentNode . |
loadMore
If you experience double or non-stop calls to your loadMore
callback, make
sure you have your CSS layout working properly before adding this component in.
Calculations are made based on the height of the container (the element the
component creates to wrap the items), so the height of the container must equal
the entire height of the items.
1.my-container { 2 overflow: auto; 3}
Some people have found success using react-infinite-scroll-component.
isLoading
prop!This component doesn't make any assumptions about what you do in terms of API calls. It's up to you to store whether you are currently loading items from an API in your state/reducers so that you don't make overlapping API calls.
1loadMore() { 2 if(!this.state.isLoading) { 3 this.props.fetchItems(); 4 } 5}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/11 approved changesets -- score normalized to 6
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
87 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More