Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FlatList's on end reached #2

Merged
merged 2 commits into from
Feb 5, 2018

Conversation

ssscassio
Copy link
Contributor

Remove load more button and add FlatList's onEndReached callback as getPokeList function

keyExtractor={this.keyExtractor}
onEndReached={()=>this.getPokeList()}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onEndReached={this.getPokeList}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a open issue in react-native: facebook/react-native#16067

There is a race condition and this implementation is a possible workaround to avoid a second onEndReached call.

@melihberberolu

@melihberberolu melihberberolu merged commit 8f49876 into melihberberolu:master Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants