Preview:
const handleScrollBotto = () => {
    // @ts-ignore
  // за основу берется положение определенного элемента страницы
    const pos = document.getElementById(elementId).getBoundingClientRect()
    if (document.body.offsetHeight - (pos.height + pos.y) > 100) {
      setIsFetchingMore(true)
    }
  };
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter