1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2024-11-22 16:55:23 +01:00
deka-dom-el/docs_src/components/examples/helloWorld.js

15 lines
284 B
JavaScript
Raw Normal View History

2023-09-26 16:02:10 +02:00
import { el, S } from "../../../index-with-signals.js";
const clicks= S(0);
document.body.append(
el().append(
2023-09-26 16:02:10 +02:00
el("p", S(()=>
"Hello World "+"🎉".repeat(clicks())
)),
el("button", {
type: "button",
onclick: ()=> clicks(clicks()+1),
textContent: "Fire"
})
)
);