Last active
April 2, 2019 17:12
-
-
Save kawnayeen/647b1ade014fc065acd7820851839021 to your computer and use it in GitHub Desktop.
Enhanced Youtube # 3 - Video List
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
// step one | |
const VideoList = (props) => { | |
const videos = props.videos; | |
return ( | |
<ul className="col-md-4 list-group"> | |
{videos.length} | |
</ul> | |
); | |
}; | |
// step two | |
const VideoListItem = (props) => { | |
return ( | |
<li>Video</li> | |
); | |
}; | |
const VideoList = (props) => { | |
const videos = props.videos; | |
const videoList = videos.map( v => <VideoListItem video={v} />); | |
return ( | |
<ul className="col-md-4 list-group"> | |
{videoList} | |
</ul> | |
); | |
}; | |
// step three | |
const videoList = videos.map( v => <VideoListItem key={v.etag} video={v} />); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment