-
-
Save tmbtech/6dbb937bff0603fb1bde to your computer and use it in GitHub Desktop.
Map over items.
This file contains hidden or 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
React.createClass({ | |
render() { | |
let videos = this.props.videos.size > 0 ? this.props.videos.map(video => { | |
return ( | |
<li key={video.id}> | |
<a href={video.desc}>{video.headline}</a> | |
</li> | |
); | |
}) : <li> no data found </li>; | |
return ( | |
<div> | |
<div>title</div> | |
<ul> | |
{videos} | |
</ul> | |
</div> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment