mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-25 09:49:36 +01:00
15 lines
288 B
JavaScript
15 lines
288 B
JavaScript
|
import { el, S } from "../../../index-with-signals.js";
|
||
|
const clicks= S(0);
|
||
|
document.body.append(
|
||
|
el("<>").append(
|
||
|
el("p", S(()=>
|
||
|
"Hello World "+"🎉".repeat(clicks())
|
||
|
)),
|
||
|
el("button", {
|
||
|
type: "button",
|
||
|
onclick: ()=> clicks(clicks()+1),
|
||
|
textContent: "Fire"
|
||
|
})
|
||
|
)
|
||
|
);
|