Gathering detailed insights and metrics for react-native-inverted-flat-list
Gathering detailed insights and metrics for react-native-inverted-flat-list
Gathering detailed insights and metrics for react-native-inverted-flat-list
Gathering detailed insights and metrics for react-native-inverted-flat-list
npm install react-native-inverted-flat-list
Typescript
Module System
Node Version
NPM Version
54.1
Supply Chain
91.5
Quality
75.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
6,867
Last Day
9
Last Week
12
Last Month
94
Last Year
2,249
4 Stars
14 Commits
1 Forks
3 Watching
3 Branches
1 Contributors
Latest Version
1.0.3
Package Id
react-native-inverted-flat-list@1.0.3
Unpacked Size
27.69 kB
Size
6.21 kB
File Count
8
NPM Version
6.4.1
Node Version
10.11.0
Cumulative downloads
Total Downloads
Last day
0%
9
Compared to previous day
Last week
71.4%
12
Compared to previous week
Last month
168.6%
94
Compared to previous month
Last year
-11.9%
2,249
Compared to previous year
InvertedFlatList enables on pull to refresh functionality. Ideal to use when you need an infinite scrolling list loading more data when the user scrolls to the top using the onPullToRefresh method.
The onEndReached
method on <FlatList inverted ... />
cannot be used
as it is only called once. This is problematic if the loading of more data
fails, for example when there is a network connection problem.
:warning: WARNING :warning:
InvertedFlatList enables the onPullToRefresh
functionality using the
onScroll
method on the flatlist. It has not been tested when passing a
custom onScroll
prop. If you run into any problems using it, please create
an issue
1$ npm install react-native-inverted-flat-list --save
OR
1$ yarn add react-native-inverted-flat-list
1import React, { Component } from 'react'; 2import { Text, View } from 'react-native'; 3import InvertedFlatList from 'react-native-inverted-flat-list'; 4 5class InfiniteScrollingList extends Component { 6 state = { 7 refreshing: false, 8 // NOTE: The messages should be in reverse order 9 messages: [ 10 { id: '5', text: 'Me too!'}, 11 { id: '4', text: 'I am fine thanks! How are you?'}, 12 { id: '3', text: 'How is it going?'}, 13 { id: '2', text: 'Hey'}, 14 { id: '1', text: 'Hello'} 15 ] 16 } 17 18 onPullToRefresh = () => { 19 const { refreshing, messages } = this.state; 20 21 // Return early if already refreshing 22 if (refreshing) return; 23 24 this.setState({refreshing: true}); 25 26 // Load more messages 27 const moreMessages = ...; 28 29 const copyMessages = messages.slice(); 30 const newMessages = copyMessages.concat(moreMessages); 31 32 this.setState({ 33 refreshing: false, 34 messages: newMessages 35 }); 36 } 37 38 render() { 39 const { messages, refreshing } = this.state; 40 return ( 41 <InvertedFlatList 42 refreshing={refreshing} // required 43 data={messages} // required 44 keyExtractor={item => item.id} // required 45 onPullToRefresh={this.onPullToRefresh} 46 renderItem={({ item }) => ( // required 47 <View> 48 <Text>{item.text}</Text> 49 </View> 50 )} 51 /> 52 ) 53 } 54} 55
For projects using react-native-inverted-flat-list
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-12-16
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