Mutating reactive data inside watchEffect causes an infinite loop. This seems like it can be mitigated by adding flush: 'sync', but then it doesn't always track dependencies correctly, like when sorting a list. Everything works as expected in vue 3.
And yes, I know I could make it a computed, but I need to mutate the original array.
Mutating reactive data inside watchEffect causes an infinite loop. This seems like it can be mitigated by adding flush: 'sync', but then it doesn't always track dependencies correctly, like when sorting a list. Everything works as expected in vue 3.
And yes, I know I could make it a computed, but I need to mutate the original array.
Vue 2 example Vue 3 example