mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-22 07:49:38 +01:00
16 lines
307 B
JavaScript
16 lines
307 B
JavaScript
import { el } from "deka-dom-el";
|
|
import { O } from "deka-dom-el/observables";
|
|
const clicks= O(0);
|
|
document.body.append(
|
|
el().append(
|
|
el("p", O(()=>
|
|
"Hello World "+"🎉".repeat(clicks())
|
|
)),
|
|
el("button", {
|
|
type: "button",
|
|
onclick: ()=> clicks(clicks()+1),
|
|
textContent: "Fire"
|
|
})
|
|
)
|
|
);
|