how to console log my scrollY position in react code example Example: check scroll top height in react js console.log(window.pageYOffset)