Youtube in React: VideoList component with infinite scroll
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 React from 'react'; | |
import {SideBar} from '../../containers/SideBar/SideBar'; | |
import {InfiniteScroll} from '../InfiniteScroll/InfiniteScroll'; | |
export class VideoList extends React.Component { | |
render() { | |
const videoPreviews = this.getVideoPreviews(); | |
return ( | |
<React.Fragment> | |
<SideBar/> | |
<div className='video-list'> | |
<InfiniteScroll bottomReachedCallback={this.props.bottomReachedCallback} showLoader={this.props.showLoader}> | |
{videoPreviews} | |
</InfiniteScroll> | |
</div> | |
</React.Fragment> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment