hooks/useEventListener
Functions
useEventListener()
Call Signature
function useEventListener<K>(
target,
event,
handler,
options?): VoidFunction;
Defined in: hooks/useEventListener.ts:8
Type Parameters
| Type Parameter |
|---|
K extends keyof DocumentEventMap |
Parameters
| Parameter | Type |
|---|---|
target | Target |
event | K |
handler | (event) => void |
options? | Options |
Returns
VoidFunction
Call Signature
function useEventListener<K>(
target,
event,
handler,
options?): VoidFunction;
Defined in: hooks/useEventListener.ts:14
Type Parameters
| Type Parameter |
|---|
K extends keyof WindowEventMap |
Parameters
| Parameter | Type |
|---|---|
target | Target |
event | K |
handler | (event) => void |
options? | Options |
Returns
VoidFunction
Call Signature
function useEventListener<K>(
target,
event,
handler,
options?): VoidFunction;
Defined in: hooks/useEventListener.ts:20
Type Parameters
| Type Parameter |
|---|
K extends keyof GlobalEventHandlersEventMap |
Parameters
| Parameter | Type |
|---|---|
target | Target |
event | K |
handler | (event) => void |
options? | Options |
Returns
VoidFunction