description |
---|
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:
- expose the webcomponent's api to the lightDOM and react to it.
- data binding between the state of the webcomponent and the lightDOM.
import { useDollars } from "@atomico/hooks/use-dollars";
useDollars(ref: Ref<HTMLSlotElement>);
{% embed url="https://webcomponents.dev/edit/CAIDkPAI9Stp5APyS87n/src/index.jsx" %}