reblend-ui
Version:
Utilities for creating robust overlay components
8 lines (7 loc) • 316 B
TypeScript
/**
* The document "window" placed in React context. Helpful for determining
* SSR context, or when rendering into an iframe.
*
* @returns the current window
*/
export default function useWindow(): [(Window & typeof globalThis) | undefined, (arg: (Window & typeof globalThis) | undefined) => Promise<boolean>];