1componentWillMount(){
2 window.addEventListener('scroll', this.loadMore);
3}
4
5componentWillUnmount(){
6 window.removeEventListener('scroll', this.loadMore);
7}
8
9loadMore(){
10 if (window.innerHeight + document.documentElement.scrollTop === document.scrollingElement.scrollHeight) {
11 // Do load more content here!
12 }
13}
14