Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.