YousefED/SyncedStore

Supporting array assignment

pierscowburn opened this issue · 2 comments

Thanks again for a great library – it continues to be super useful in our application!

I noticed that there's a reference in the code to array assignment not being supported, and have run across this when trying to use array assignment on an upcoming feature. I was wondering if you had an idea as to how much work is required in order to support this – i.e. are there gotchas you're aware of that lead to the decision not to support it yet?

needs commented

Here is how to set an array value at some specific index when using synced store and Yjs:

myArray.splice(index, 1, newValue);

The reason array assignment is not supported is explained here: #59

You could indeed use splice as a workaround