Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created August 10, 2018 02:13
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 dance2die/b528f1f977bc000c3b1cde97146a1a9b to your computer and use it in GitHub Desktop.
Save dance2die/b528f1f977bc000c3b1cde97146a1a9b to your computer and use it in GitHub Desktop.
getNextPosts = async () => {
const newPosts = (await this.repo.next()).value;
this.setState(prevState => ({
posts: [...prevState.posts, ...newPosts],
isBottomReached: false
}));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment