get scroll postion of element from event react code example Example: check scroll top height in react js console.log(window.pageYOffset)