Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/usehooks-ts.ts>useEventListener

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function useEventListener
import { useEventListener } from "https://deno.land/x/netzo@0.5.63/deps/usehooks-ts.ts";

Type Parameters

K extends keyof DocumentEventMap

Parameters

eventName: K
handler: (event: DocumentEventMap[K]) => void
element: RefObject<Document>
optional
options: boolean | AddEventListenerOptions