Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new test for computed that sorts an array
I had a discussion with SEB and he told me about auto-sort compute. He said that it would be better if we could implement automatic in-place sorting without triggering the reactivity. However, this PR can't actually handle that because this PR is just an extension of the existing reactivity, it doesn't actually modify it. So if inplace sort will result to multiple mutations, then that will be the number of times the callback will be called. Even inside a `computed` that's introduced in this PR. Nevertheless, compute that depends on sorted array is still useful, it's just that the sorting should not be done in-place. This commit introduces an example where a computed value that returns a sorted array is only called once (in a batched context) even though multiple mutations are made to the array.
- Loading branch information