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:
@ -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";
|
||||
|
Reference in New Issue
Block a user