Skip to main content

Function: useEventListener()

Call Signature

useEventListener<K>(target, event, handler, options?): VoidFunction

Defined in: hooks/useEventListener.ts:11

Type Parameters

K

K extends keyof DocumentEventMap

Parameters

target

Target

event

K

handler

(event) => void

options?

Options

Returns

VoidFunction

Call Signature

useEventListener<K>(target, event, handler, options?): VoidFunction

Defined in: hooks/useEventListener.ts:17

Type Parameters

K

K extends keyof WindowEventMap

Parameters

target

Target

event

K

handler

(event) => void

options?

Options

Returns

VoidFunction

Call Signature

useEventListener<K>(target, event, handler, options?): VoidFunction

Defined in: hooks/useEventListener.ts:23

Type Parameters

K

K extends keyof GlobalEventHandlersEventMap

Parameters

target

Target

event

K

handler

(event) => void

options?

Options

Returns

VoidFunction