For the complete documentation index, see llms.txt. This page is also available as Markdown.

use-listener

Associate a listener with a reference

Module

import { useListener } from "@atomico/hooks/use-listener";

Syntax

useListener(
    ref: Ref<Element>, 
    name: string, 
    handler: (event)=>void, 
    option?: boolean | AddEventListenerOptions 
);

Example

Last updated

Was this helpful?