
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
infinite-scroll-x
Advanced tools
React native scroll view (infnite). This is a really working react native infinite scroll view component. Compatable with both IOS & Android. Fine with all react native versions.
npm i infinite-scroll-x --save
<InfiniteScroll
onLoadMoreAsync={this.loadMorePage()}
horizontal={false} //true - if you want in horizontal
style={styles.scrollView}
{...prop}
>
{...children}
</InfiniteScroll>
var React = require('react');
var {
Text,
ListView
} = require('react-native');
var InfiniteScroll = require('infinite-scroll-x');
var Example = React.createClass({
getInitialState(){
var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
var rows = ["China","Korea","Singapore","Malaysia"]
return {
data: rows,
dataSource: ds.cloneWithRows(rows)
}
},
loadMorePage(){
//here .. collect the data from server somehow
let new_data = ['Japan','Myanmar','India','Thailand'];
let rows = this.state.data;
rows.push.apply(rows, new_data);
this.setState({
data: rows,
dataSource: this.state.dataSource.cloneWithRows(rows)
});
},
render(){
return (
<InfiniteScroll
horizontal={false} //true - if you want in horizontal
onLoadMoreAsync={this.loadMorePage()}
style={styles.scrollView}>
<ListView
enableEmptySections={true}
dataSource={this.state.dataSource}
renderRow={(data)=><Text>{data}</Text>}
/>
</InfiniteScroll>
);
}
});
module.exports = Example
Hey dude! Help me out for a couple of :beers:!
FAQs
Infinite Scroll View React Native
We found that infinite-scroll-x demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.