import throttle from 'lodash.throttle';class LoadMoreButton extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);this.handleClickThrottled =
throttle(this.handleClick, 1000); // max 1 time/sec
}
componentWillUnmount() {
this.handleClickThrottled.cancel();
}
render() {
return ;
}
handleClick() {
this.props.loadMore();
}}