UNPKG

hooks-belt

Version:

A comprehensive collection of useful React hooks for common use cases

23 lines 493 B
/** * A hook that tracks the window dimensions. * Automatically updates when the window is resized. * * @returns An object with width and height of the window * * @example * ```tsx * const { width, height } = useWindowSize() * * return ( * <div> * Window size: {width} x {height} * {width < 768 && <MobileMenu />} * </div> * ) * ``` */ export declare function useWindowSize(): { width: number; height: number; }; //# sourceMappingURL=useWindowSize.d.ts.map