Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created December 17, 2018 16:21
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 productioncoder/5aa857df43054350e667ab4a731c8562 to your computer and use it in GitHub Desktop.
Save productioncoder/5aa857df43054350e667ab4a731c8562 to your computer and use it in GitHub Desktop.
Youtube in React: rendering video grids dynamically in HomeContent component
/*....*/
import {getVideoCategoryIds} from '../../store/reducers/videos';
class Home extends React.Component {
render() {
const trendingVideos = this.getTrendingVideos();
const categoryGrids = this.getVideoGridsForCategories();
return (
<div className='home-content'>
<div className="responsive-video-grid-container">
<VideoGrid title='Trending' videos={trendingVideos}/>
{categoryGrids}
</div>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment