Github
Twitter
Discord
Playground
Searchβ¦
English
π
Atomico
π
Getting started with Atomico
Api
π§¬
Props(Properties)
π§©
VirtualDOM
π£
Hooks
π¬
Testing
Guides
π§
Atomico design patterns
πΊ
Atomico style guide
π‘
Atomico with Typescript
π€
Atomico and React
π
Slot
π
Archives
@atomico
@atomico/store
@atomico/design-tokens
@atomico/router
@atomico/react
@atomico/hooks
use-ref-values
use-script
use-attributes
use-prop-proxy
use-click-press
use-dollars
use-reflect-event
use-keyboar
use-click-coordinates
use-copy
use-debounce-state
use-form
use-listener
use-disabled
use-css
use-channel
use-promise
use-responsive-state
use-parent
use-resize-observer
use-slot
use-render
use-mutation-observer
use-css-light-dom
use-controller
use-router
use-async-effect
use-child-nodes
use-force-render
@atomico/components
@atomico/exports
@atomico/magic-form
Support
Discord
Github
Twitter
Powered By
GitBook
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
Previous
use-dollars
Next
use-keyboar
Last modified
2mo ago
Copy link
Edit on GitHub
Contents
module
Syntax useReflectEvent
Syntax reflectEvent