Check if user scrolls to the bottom of the page
JavaScript
const isAtBottom = () => document.documentElement.clientHeight + window.scrollY >= document.documentElement.scrollHeightTypeScript
const isAtBottom = (): boolean => document.documentElement.clientHeight + window.scrollY >= document.documentElement.scrollHeight