I find the CRDT space very fascinating.
As far as I understand now, once you create a document in YJS, you can share updates with other clients in realtime and all (or most) conflicts are resolved gracefully.
That is pretty cool.
However, I do not understand how YJS would function in the following scenario.
Let’s say we create a new YJS document for a hashmap - representing an entity (e.g. building)
As it represents a specific building, we assign a unique identity to it “Sydney Opera House”
Now let’s say, that two client machines (both offline for a sec) create a new YJS document for the same building (“Sydney Opera House”).
Now assume that the app can detect that two documents exist for the same building: doc1 and doc2
Can we now merge those documents (doc1 and doc2) using YJS?