Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

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

Custom hook for handling click events anywhere on the document.

Examples

// Usage of useClickAnywhere hook const handleClick = (event) => { console.log('Document clicked!', event); };

// Attach click event handler to document useClickAnywhere(handleClick);

Parameters

handler: (event: MouseEvent) => void
  • The function to be called when a click event is detected anywhere on the document.