useWindowSize

provides the current size of the window on the user monitor

Demo

Resize your window

Width: 0px, Height: 0px

Usage

const { const width: Signal<number>width, const height: Signal<number>height } = 
function useWindowSize(listenOrientation?: boolean): {
    width: Signal<number>;
    height: Signal<number>;
}
useWindowSize
()