UNPKG

@rws-air/utils

Version:
19 lines 535 B
/** * React hook to get the current window size * Triggers on window resize. * * Use with {@link https://github.com/xnimorz/use-debounce | use-debounce} to ensure it is not triggered instantly!! * * @example * ```typescript * import { useDebounce } from 'use-debounce'; * * const [ width, height ] = useDebounce(useWindowSize(), 1000); * * useEffect(() => { * // Do something here * }, [ width, height ]); * ``` */ export declare function useWindowSize(): [number, number]; //# sourceMappingURL=UseWindowSize.d.ts.map