1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2024-11-23 00:59:38 +01:00
deka-dom-el/docs_src/components/examples/introducing/helloWorld.js
Jan Andrle 57fb9512ee
🔤 texts helpers
infuture may be also translations
2024-06-03 13:56:20 +02:00

16 lines
303 B
JavaScript

import { el } from "deka-dom-el";
import { S } from "deka-dom-el/signals";
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"
})
)
);