UNPKG

rooks

Version:

Essential React custom hooks ⚓ to super charge your components!

16 lines 791 B
import type { ListenerOptions } from "@/types/utils"; /** * useWindowEventListener hook * * A react hook to an event listener to the window * * @param {string} eventName The event to track * @param {Function} callback The callback to be called on event * @param {ListenerOptions} listenerOptions The options to be passed to the event listener * @param {boolean} isLayoutEffect Should it use layout effect. Defaults to false * @returns {undefined} * @see https://react-hooks.org/docs/useWindowEventListener */ declare function useWindowEventListener(eventName: string, callback: (...args: unknown[]) => void, listenerOptions?: ListenerOptions, isLayoutEffect?: boolean): void; export { useWindowEventListener }; //# sourceMappingURL=useWindowEventListener.d.ts.map