Youtube in React: infinite scroll in WatchContent
/* ... */ | |
import {InfiniteScroll} from '../../../components/InfiniteScroll/InfiniteScroll'; | |
class WatchContent extends React.Component { | |
render() { | |
/* ... */ | |
return ( | |
<InfiniteScroll bottomReachedCallback={this.props.bottomReachedCallback} showLoader={this.shouldShowLoader()}> | |
<div className='watch-grid'> | |
{/* ... */} | |
</div> | |
</InfiniteScroll> | |
); | |
} | |
shouldShowLoader() { | |
return !!this.props.nextPageToken; | |
} | |
} | |
/* ... */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment