Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created October 29, 2018 20:18
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/6391c146a4d9d13166fa051cb093d869 to your computer and use it in GitHub Desktop.
Save productioncoder/6391c146a4d9d13166fa051cb093d869 to your computer and use it in GitHub Desktop.
Youtube HomeContent with InfiniteScroll
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