UNPKG

qol-hooks

Version:

A collection of React hooks to improve the quality of life of developers.

20 lines (19 loc) 437 B
type WindowSize = { width: number | undefined; height: number | undefined; }; /** * @description A hook to get the current window size * @returns {WindowSize} The current window size * * @example ```tsx * const { width, height } = useWindowSize(); * return ( * <p> * Window width: {width}, window height: {height} * </p> * ); * ``` */ declare function useWindowSize(): WindowSize; export default useWindowSize;