useWindowsize is a react js custom hook which can be used to get the current height and width of the window when vw & vh are not working. In certain conditions like absolutely positioned elements sometimes don't respond to viewport width & height, this hook is very much useful in those cases. It watches the height and width of the screen & updates the values in the state likewise.