0

I want to check weather vertical scroll is appear on page using React, and also want dom height and browser height using react.

Aamir
  • 1
  • 2

2 Answers2

0

You can call plain vanilla window object in the component by window.innerHeight and window.innerWidth to get the height and width.

ChrisY
  • 3
  • 3
0

you can find 2 usefull answers in here: Detecting scroll direction and here: How to determine scroll direction without actually scrolling

about scrolling... and for the height: window.innerHeight() - window.outerHeight()

Amir Rezvani
  • 1,262
  • 11
  • 34