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

🚀 Remove signal listeners automatically (fixes #20)

This commit is contained in:
2023-10-13 20:57:21 +02:00
parent 4c571354c4
commit 9f57913f8d
10 changed files with 494 additions and 414 deletions

View File

@ -18,7 +18,7 @@ const className= style.host(todosComponent).css`
export function todosComponent({ todos= [ "Task A" ] }= {}){
const todosS= S(todos.map(t=> S(t)), {
add(v){ this.value.push(S(v)); },
remove(i){ S.clear(this.value.splice(i, 1)[0]); },
remove(i){ this.value.splice(i, 1)[0]; },
[S.symbols.onclear](){ S.clear(...this.value); },
});
const name= "todoName";