mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-21 23:39:37 +01:00
Jan Andrle
cd62782c7b
* ⚡ refact docs to make editing (now renaming observables to signal) easier * ⚡ ⚡ use signal(s) term isntead of observable(s) * ⚡ 🔤 version + typo * 🐛 customElement example (0→S) * 📺 version in package-lock.json
16 lines
303 B
JavaScript
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"
|
|
})
|
|
)
|
|
);
|