In Vue.js 3 (beta), I have defined an array using reactive, as I want to bind its contents to some UI controls in a loop. So far, this works and everything is fine.
Now, I need to update a value within this array, which means I need to run a find or a findIndex on this array. Since the array is being proxied by Vue.js, this doesn't work as expected: The proxy is just not a simple plain old array.
What I did is get a copy using toRaw, run findIndex on that one, and then update the original array using the index. This works, but of course it doesn't seem to be very elegant.
Is there a better way to approach this?
PS: It's fine if it's a solution that only works in Vue 3, I don't care about the 2.x series.