Skip to content

Instantly share code, notes, and snippets.

View marshallds's full-sized avatar

Marshall Smith marshallds

View GitHub Profile
class Component extends React.Component {
onScroll(event) {
this.scrollPosition = getScrollPosition(event);
if (this.scrolling) return;
this.scrolling = true;
const processLongOperation = (beginPosition) => {
longOperation(beginPosition, (completionState) => {
this.setState(completionState, () => {
//rendered