Newbie question: First starter problem

Hi! I’ve been doing some stuff with yjs, but I’m a bit unsure how to structure my data and handle new joiners.

Currently for people first joining a room, I create a map, and I set some data under each of the keys, e.g. texts + metadata.

ydoc -> docs Map<key: name> -> doc Map<key: 'metadata' | 'text'>

So when someone first joins, I do a bit of setup to to create this structure, however, this means that all the subtree could be overwritten. If people disconnect for a bit.

Not sure if I’m missing best practices etc on how to yjs