react get already scrolled pos of div code example Example: check scroll top height in react js console.log(window.pageYOffset)