by recursive · 3y ago · 0 comments
The one I made is https://mutraction.dev/ The name is a portmanteau of mutation tracking.
I've yet to see any framework have O(1) collection mutation reactivity.
For mutations that change the length, extra elements are built or removed at the end. Assignment straight to an index (that doesn't change length) is able to use normal object property semantics.
arr.push(e) and arr[i] = e are both O(1). But not all array operations achieve this.
I have some vague ideas about implementing efficient .splice() calls. Right now knowledge about splicing semantics is lost in between the proxy layer and `ForEach` DOM node array. But I have a bunch of other plans to do first.