Installations
npm install react-infinitum
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
5.0.0
NPM Version
3.3.12
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Love this project? Help keep it running — sponsor us today! 🚀
Developer
CezarLuiz0
Download Statistics
Total Downloads
1,753
Last Day
1
Last Week
2
Last Month
10
Last Year
82
GitHub Statistics
5 Stars
7 Commits
2 Watching
3 Branches
1 Contributors
Bundle Size
2.31 kB
Minified
1.00 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.3.0
Package Id
react-infinitum@0.3.0
Size
3.75 kB
NPM Version
3.3.12
Node Version
5.0.0
Total Downloads
Cumulative downloads
Total Downloads
1,753
Last day
0%
1
Compared to previous day
Last week
-66.7%
2
Compared to previous week
Last month
100%
10
Compared to previous month
Last year
-17.2%
82
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
5
React Infinitum
React Infinitum is a window infinite scroll loader
Install
npm install --save react-infinitum
Usage
1import React from 'react'; 2import Infinitum from 'react-infinitum'; 3 4let fakeData = [ 5 {city: 'Curitiba', country: 'Brazil'}, 6 {city: 'New York', country: 'United States'}, 7 {city: 'Tokyo', country: 'Japan'} 8]; 9 10class Feeds extends React.Component { 11 constructor(props) { 12 super(props); 13 14 this.state = { 15 cities: fakeData, 16 loadMore: true 17 }; 18 } 19 20 loadMoreCities() { 21 // Set loadMore to false and ReactInfinitum will be blocked 22 this.setState({ 23 loadMore: false 24 }); 25 26 // Simulate an AJAX request 27 ajax.get('/cities') 28 .then(res => { 29 this.setState({ 30 cities: this.state.cities.concat(res), 31 loadMore: true 32 }); 33 }) 34 .catch(() => { 35 // No more cities 36 this.setState({ 37 loadMore: false 38 }); 39 }); 40 } 41 42 render() { 43 return ( 44 <Infinitum onReachBottom={this.loadMoreCities.bind(this)} loadMore={this.state.loadMore}> 45 {this.state.cities.map((city, i) => { 46 return ( 47 <div key={i}> 48 <p>{city.city}</p> 49 <p>{city.country}</p> 50 </div> 51 ); 52 })} 53 </Infinitum> 54 ); 55 } 56} 57 58export default Feeds;
Properties
Name | Type | Required? | Default Value | Description |
---|---|---|---|---|
onReachBottom | function | Yes | - | The callback that will be fired when window reach the page bottom |
loadMore | boolean | No | true | The flag that indicate if will call the callback |
trigger | number | No | 0.85 | A number between 0 - 1 that indicate the window scroll percentage to reach on page bottom |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/7 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3
/10
Last Scanned on 2025-02-03
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