Socket
Book a DemoInstallSign in
Socket

infinite-scroll-x

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

infinite-scroll-x

Infinite Scroll View React Native

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

var React = require('react'); var { Text, ListView } = require('react-native'); var InfiniteScroll = require('infinite-scroll');

var Example = React.createClass({ getInitialState(){ var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}); var rows = [1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9] return { data: rows, dataSource: ds.cloneWithRows(rows) } }, loadMorePage(){ 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 ( <ListView enableEmptySections={true} dataSource={this.state.dataSource} renderRow={(data)=>{data}} /> ); } });

module.exports = Example

Keywords

infinite

FAQs

Package last updated on 29 Jul 2016

Did you know?

Socket

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.

Install

Related posts