-
-
Save samuelayo/9d95f854d03cb1ef70a83d836d7617e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
componentDidMount() { | |
// Detect when scrolled to bottom. | |
this.refs.myscroll.addEventListener("scroll", () => { | |
if ( | |
this.refs.myscroll.scrollTop + this.refs.myscroll.clientHeight >= | |
this.refs.myscroll.scrollHeight | |
) { | |
this.loadMore(); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment