Skip to content

Instantly share code, notes, and snippets.

@olecksamdr
Last active October 18, 2018 06:39
Show Gist options
  • Save olecksamdr/492b602ccff42a3fa9b68e52dbdd917c to your computer and use it in GitHub Desktop.
Save olecksamdr/492b602ccff42a3fa9b68e52dbdd917c to your computer and use it in GitHub Desktop.
const handleScroll = ({ target }) => {
if (target.scrollTop + target.clientHeight >= target.scrollHeight) {
// loadMoreData();
}
};
element.addEventListener('scroll', handleScroll)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment