mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-12-15 05:43:45 +01:00
♻️ Simplify signals logic (use functions to read/set)
This commit is contained in:
@@ -102,8 +102,8 @@ document.body.append(
|
||||
```js
|
||||
const value= S("");
|
||||
document.body.append(
|
||||
el("span", { style: { fontWeight: "bold" }, textContent: ()=> S(value) }),
|
||||
el("span", { style: { fontWeight: "bold" }, textContent: value }),
|
||||
el("input", { type: "text" },
|
||||
listen("change", event=> S(value, event.target, value)))
|
||||
listen("change", event=> value(event.target.value)))
|
||||
);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user