Clear a RealtimeArray
I understand that we can't have a remove for a RealtimeArray to avoid race conditions, but clearing the entire array is a very useful operation for this powerful structure! Clearing it would make the structure even better! Let's clean data! 🧹
7 Replies
yeah that would be useful. the current workaround is to put the array inside a set, then you can clear the set to make a new array
This seems like it would be a very useful feature honestly
agreed. I’ll throw it on the list!
Thank you! I've tried the workaround and I've found a strange bug where changes aren't synced on a fresh model until one of the client leaves. This is a very powerful and useful feature that I would love to see!
Just don't clear it off!
are you on the latest version of Normcore? this definitely shouldn’t be happening
Even if we wrap the RealtimeArray with RealtimeSet we wont get those nice event fires on RealtimeArray. it wont fire events if we subscribe to RealtimeSet.OnModelAdded.
need this feature please
can't you just sub the events from the array within the set?