Thanks for the review. I fixed the example in your second point.
About the first point: It's not actually wrong in the place you thought, just an imrecise statement- the filter method would indeed not be run if the length of todos doesn't change - except if you would mutate the array with something like .reverse() or .sort().
But the example at the end of the article you refer to is indeed a copy-paste error from the initial example, so I fixed that to refer to openTodos.
Reactive todos is deeply reactive, right?
So if you change "done" prop of any of the todos, then the computed openTodos will need to be reevaluated and rerun the filter method even though the length stays the same.
Thanks for the review. I fixed the example in your second point.
About the first point: It's not actually wrong in the place you thought, just an imrecise statement- the filter method would indeed not be run if the length of
todos
doesn't change - except if you would mutate the array with something like.reverse()
or.sort()
.But the example at the end of the article you refer to is indeed a copy-paste error from the initial example, so I fixed that to refer to
openTodos
.Thanks again
I tend to disagree :)
Reactive
todos
is deeply reactive, right?So if you change "done" prop of any of the todos, then the computed
openTodos
will need to be reevaluated and rerun the filter method even though the length stays the same.Argh. It's so hard to come up with good examples 😭
Yes you are right in this case - I wasn't really paying attention to what the filter did. 😬
Will see if I can change it to be more precise.