react-window-size
react-window-size copied to clipboard
Wrong dimensions
On the latest 1.2.2, this component is not looking at the the window dimensions anymore. It is looking at the size of the body element, which can be bigger than the viewport size:
this.state = {
width: document.body.clientWidth,
height: document.body.clientHeight,
};
Furthermore, the following line also causes dimensions to be wrong for about 1 whole second:
setTimeout(this._handleResize, 1000);