Raynos / observ-array

An array containing observable values
MIT License
26 stars 4 forks source link

Document and iterate on `_diff` #4

Open Raynos opened 10 years ago

Raynos commented 10 years ago

Whenever a mutative splice() operation is done on an observable array the arguments to splice() are stored as _diff on the new array value.

We should document that _diff is meant to be used to implement efficient rendering of lists by splicing the splice differences into an <ul> directly without having to do an O(n) diff(prev, curr).

We should also iterate on the changes.

cc @Matt-Esch feedback for performance appreciated.