use-reflect-event
the useReflectEvent hook reflects the event from the reference origin to the reference destination
the useReflectEvent hook reflects the event from the reference origin to the reference destination, the captured event will be canceled
One of the possibilities of this hook is to reflect the events inside shadowDOM to lightDOM, example when using forms

module

1
import {
2
useReflectEvent,
3
reflectEvent
4
} from "@atomico/hooks/use-reflect-event";
Copied!

Syntax useReflectEvent

1
useReflectEvent(
2
refFrom: Ref<Element>,
3
refTo: Ref<Element>,
4
eventType: string
5
);
Copied!
useRefectEvent will listen for the eventType of refFrom, to reflect it on refTo

Syntax reflectEvent

1
reflectEvent( target: Element, event: Event );
Copied!
Reflects on an element the given event