Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- componentDidMount(){
- let _this=this;
- let container = document.getElementById('body');
- container.onscroll = function () {
- let height = this.clientHeight;
- let scrollHeight = this.scrollHeight;
- let scrollTop = this.scrollTop;
- if (height + scrollTop === scrollHeight) {
- _this.setState({ display: 'loader'});
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement