Skip to content

Instantly share code, notes, and snippets.

@dance2die

dance2die/render.js

Created Aug 10, 2018
Embed
What would you like to do?
render() {
const { posts, isBottomReached } = this.state;
const postComponents = posts.map((post, i) => (
<RedditPost key={post.id} post={post} order={i + 1} />
));
return (
<div className="App">
{postComponents}
{isBottomReached ? null : (
<button className="loadMoreButton" onClick={this.loadMoreStories}>
Load More Stories
</button>
)}
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.