Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. componentDidMount(){
  2. let _this=this;
  3. let container = document.getElementById('body');
  4.  
  5. container.onscroll = function () {
  6. let height = this.clientHeight;
  7. let scrollHeight = this.scrollHeight;
  8. let scrollTop = this.scrollTop;
  9.  
  10. if (height + scrollTop === scrollHeight) {
  11. _this.setState({ display: 'loader'});
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement