Naively forwarding a callback function to a private collection inside a signaling wrapper exposes it to untracked reads and writes.
Taking SignalMap as an example, instead of:
forEach (fn) {
this.collection.get();
this.vals.forEach(fn);
}
...you probably want to pass the signaling collection to the callback:
forEach (fn) {
this.collection.get();
this.vals.forEach((v, k) => fn(v, k, this));
}
Naively forwarding a callback function to a private collection inside a signaling wrapper exposes it to untracked reads and writes.
Taking SignalMap as an example, instead of:
...you probably want to pass the signaling collection to the callback: