@ducor/hooks
Version:
A collection of useful React hooks for building modern web applications. Includes hooks for clipboard operations, window events, intervals, timeouts, and more.
9 lines (8 loc) • 386 B
TypeScript
import type { WindowEventHandler, WindowEventOptions } from "@ducor/types";
/**
* `useWindowEvent` is a custom hook that assigns an event listener to `window`.
*
* @see Docs https://ui.ducor.net/hooks/use-window-event
*/
declare const useWindowEvent: <E extends string>(event: E, handler: WindowEventHandler<E>, options?: WindowEventOptions) => void;
export default useWindowEvent;