I am trying to get offset height of div to do some calculations and I noticed that it always returns the same height even on smaller screens and mobiles when the div height is different, so I don't get it why doesn't it return the correct height on mobile? any help please?
useEffect(() => {
const videoParent: any = playerWrapperReference.current?.parentNode;
videoParentNode.current = videoParent;
videoOffsetHeight.current =
playerWrapperReference.current != null
? playerWrapperReference.current.offsetHeight
: 0;
}, []);