1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2026-05-16 10:11:24 +02:00
This commit is contained in:
2025-03-10 18:20:54 +01:00
parent 104837500d
commit 97defc5884
16 changed files with 20 additions and 29 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ function component(){
const textContent= S("Click to change text.");
const onclickChange= on("click", function redispatch(){
textContent("Text changed! "+(new Date()).toString())
textContent.set("Text changed! "+(new Date()).toString())
});
return el("p", textContent, onclickChange);
}
@@ -1,14 +0,0 @@
import { scope } from "deka-dom-el";
import { S } from "deka-dom-el/signals";
function customSignalLogic() {
// Create an isolated scope for a specific operation
scope.push(); // Start new scope
// These signals are in the new scope
const isolatedCount = S(0);
const isolatedDerived = S(() => isolatedCount.get() * 2);
// Clean up by returning to previous scope
scope.pop();
}