Skip to content

Instantly share code, notes, and snippets.

@smhatre59
Created October 29, 2016 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smhatre59/c67683c2f7542146508410141e2a3bfc to your computer and use it in GitHub Desktop.
Save smhatre59/c67683c2f7542146508410141e2a3bfc to your computer and use it in GitHub Desktop.
import ListViewCustom from 'react-native-recycler-listview';
constructor(props) {
super(props);
var array = [];
for(var i = 0; i < 1000; i++){
array.push({"title":"Title","subtitle":"subtiles"});
}
this.state = {
dataSource:{"names": array}
};
}
render() {
return (
<View style={styles.container}>
<ListViewCustom
src={this.state.dataSource}
customStyle={{"fontSize":"12","padding":"0","fontColor":"#ff6600"}}
style={{flex:1,width:Dimensions.get('window').width,padding:0,margin:0}}>
</ListViewCustom>
</View>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment