Skip to content

Instantly share code, notes, and snippets.

@AsimKarel
Last active October 5, 2019 05:03
Show Gist options
  • Select an option

  • Save AsimKarel/6b86334e2859f3a8025f4d1c6aa98723 to your computer and use it in GitHub Desktop.

Select an option

Save AsimKarel/6b86334e2859f3a8025f4d1c6aa98723 to your computer and use it in GitHub Desktop.
<View style={styles.container}>
<FlatList
ref={ref => {
this.flatListRef = ref;
}}
onViewableItemsChanged={this.onViewableItemsChanged}
.../>
<View style={styles.buttonContainer}>
<Button title={'Previous'} onPress={this.scrollPrevious} />
<Button title={'Next'} onPress={this.scrollNext} />
</View>
</View>
const styles = StyleSheet.create({
...
buttonContainer: {
justifyContent: 'space-between',
flexDirection: 'row',
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment