feat: some shit
This commit is contained in:
@ -3,7 +3,7 @@ import { useEffect, useRef } from "preact/hooks";
|
||||
export function useEventListener<T extends Event>(
|
||||
eventName: string,
|
||||
handler: (event: T) => void,
|
||||
element = window,
|
||||
element: Window | HTMLElement = window,
|
||||
) {
|
||||
console.log("Add Eventlistener", { eventName, element, handler });
|
||||
// Create a ref that stores handler
|
||||
|
Reference in New Issue
Block a user