Created
October 31, 2017 12:43
-
-
Save Chalarangelo/483ee340fad2fc867d355a22273aa1d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let posts = '', postLinks = ''; | |
if(this.state.posts && this.state.posts.data){ | |
posts = this.state.posts.data.map(post => {return <Post post={post} key={"post_"+post.id}/>;}); | |
postLinks = this.state.posts.data.map(post => {return <a href={"#"+post.id} key={"post_link_"+post.id} className="button">{post.title}</a>}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment