1
0
mirror of https://github.com/jaandrle/deka-dom-el synced 2025-07-01 12:22:15 +02:00

bs/lint

This commit is contained in:
2025-03-04 17:00:14 +01:00
parent f2ce23d9f7
commit 508d93bb1a
11 changed files with 756 additions and 737 deletions

View File

@ -0,0 +1,4 @@
// Example of reactive element marker
<!--<dde:mark type=\"reactive\" source=\"...\">-->
<!-- content that updates when signal changes -->
<!--</dde:mark>-->

View File

@ -3,8 +3,8 @@ import { S } from "deka-dom-el/signals";
// Debugging a derived signal
const name = S('Alice');
const greeting = S(() => {
console.log('Computing greeting...');
return 'Hello, ' + name.get();
console.log('Computing greeting...');
return 'Hello, ' + name.get();
});
// Monitor the derived signal
@ -17,4 +17,4 @@ name.set('Bob'); // Should trigger computation and listener
// Computing greeting...
// Greeting changed to: Hello, Alice
// Computing greeting...
// Greeting changed to: Hello, Bob
// Greeting changed to: Hello, Bob

View File

@ -10,10 +10,10 @@ const { el } = await register(dom);
// Use deka-dom-el normally
dom.window.document.body.append(
el("div", { className: "container" }).append(
el("h1", "Hello, SSR World!"),
el("p", "This content was rendered on the server.")
)
el("div", { className: "container" }).append(
el("h1", "Hello, SSR World!"),
el("p", "This content was rendered on the server.")
)
);
// Wait for any async operations to complete