useDeviceSize hook — how to dynamically get window width and height in ReactJS

By