how to get scroll value and div height in reactjs code example Example: check scroll top height in react js console.log(window.pageYOffset)