Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Infinite scroll component
import React from 'react';
import Waypoint from 'react-waypoint';
import {Loader} from 'semantic-ui-react';
import './InfiniteScroll.scss';
export function InfiniteScroll(props) {
return (
<React.Fragment>
{props.children}
<Waypoint onEnter={props.bottomReachedCallback}>
<div className='loader-container'>
<Loader active={props.showLoader} inline='centered' />
</div>
</Waypoint>
</React.Fragment>
);
}
.loader-container {
padding-bottom: 14px;
}
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.