Created
October 29, 2018 20:18
-
-
Save productioncoder/6391c146a4d9d13166fa051cb093d869 to your computer and use it in GitHub Desktop.
Youtube HomeContent with InfiniteScroll
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
import {InfiniteScroll} from '../../../components/InfiniteScroll/InfiniteScroll'; | |
/* ... */ | |
class HomeContent extends React.Component { | |
render() { | |
const trendingVideos = this.getTrendingVideos(); | |
const categoryGrids = this.getVideoGridsForCategories(); | |
return ( | |
<div className='home-content'> | |
<div className="responsive-video-grid-container"> | |
<InfiniteScroll bottomReachedCallback={this.props.bottomReachedCallback} showLoader={this.props.showLoader}> | |
<VideoGrid title='Trending' videos={trendingVideos}/> | |
{categoryGrids} | |
</InfiniteScroll> | |
</div> | |
</div> | |
); | |
} | |
/* ... */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment