Skip to content

Instantly share code, notes, and snippets.

@dance2die
Last active August 13, 2018 14:34
Show Gist options
  • Save dance2die/e22997d6d642f6dac295f916714d252e to your computer and use it in GitHub Desktop.
Save dance2die/e22997d6d642f6dac295f916714d252e to your computer and use it in GitHub Desktop.
import React, { Component } from "react";
import ReactDOM from "react-dom";
// import debounce from "lodash.debounce";
import throttle from "lodash.throttle";
import "./styles.css";
import { getContent } from "./ContentRepo";
class App extends Component {
state = { posts: [], isBottomReached: false };
repo = getContent();
getNextPosts = async () => { ... }
throttledWindowHandler = throttle(...);
windowSizeHandler = e => { ... }
async componentDidMount() { ... }
componentWillUnmount() { ... }
loadMoreStories = () => { ... }
render() { ... }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment