From 03b30bec95420a9a7e2a2e2f63f7361bb18e20b3 Mon Sep 17 00:00:00 2001 From: Alessandro Agosto Date: Thu, 10 Aug 2017 18:33:22 +0200 Subject: [PATCH] Fix indentation --- README.md | 78 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 8ac96c5..0a51f26 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,12 @@ Tested with Android 4.1+ and iOS 10. ```js -{...children} + onLoadMoreAsync={this.loadMorePages} + horizontal={false} // true - if you want in horizontal + style={styles.scrollView} + {...prop} +> + {...children} ``` @@ -30,39 +30,39 @@ import { Text, ListView } from 'react-native'; import InfiniteScroll from 'react-native-infinite-scroll'; class Example extends Component ({ - 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 ( - - {data}} - /> - - ); - } + 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 ( + + {data}} + /> + + ); + } });