react load after scrolling

Solutions on MaxInterview for react load after scrolling by the best coders in the world

showing results for - "react load after scrolling"
Donovan
30 Feb 2016
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