use-dollars
Create reactive templates that interact with the state of your webcomponent
The purpose of this hook is to allow communication between the webcomponent and the lightDOM without knowing the DOM, achieving with this hook:
  1. 1.
    expose the webcomponent's api to the lightDOM and react to it.
  2. 2.
    data binding between the state of the webcomponent and the lightDOM.

module

1
import { useDollars } from "@atomico/hooks/use-dollars";
Copied!

Syntax

1
useDollars(ref: Ref<HTMLSlotElement>);
Copied!

Example

WebComponents.dev
WebComponents.dev
Copy link
Edit on GitHub