import haunted, { useState } from 'https://unpkg.com/haunted/core.js?module'; import { html, render } from 'https://unpkg.com/lighterhtml?module'; const { component } = haunted({ render: (what, where) => render(where, () => what) }); function Counter() { let [count, set] = useState(0); return html`

Counter

count: ${count}

`; } customElements.define('my-counter', component(Counter));