The library tries to provide pure JavaScript tool(s) to create reactive interfaces.
The main goals are:
- provide a small wrappers/utilities around the native JavaScript DOM
- keep library size around 10kB at maximum (if possible)
- zero dependencies (if possible)
- prefer a declarative/functional approach
- unopinionated (allow alternative methods)
It is, in fact, an reimplementation of jaandrle/dollar_dom_component.
import { el, S } from "https://cdn.jsdelivr.net/gh/jaandrle/deka-dom-el/dist/esm-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"
})
)
);