@rws-air/utils
Version:
Utilities for rws-air libraries and applications
19 lines • 535 B
TypeScript
/**
* 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