YDoc
YDoc, often referred to as Y.Doc in code, is the central document model used by the Yjs library for building collaborative real-time applications. It represents a shared, editable document that can be modified by multiple clients concurrently. The document uses conflict-free replicated data type (CRDT) techniques to merge changes without requiring a central server.
Within a YDoc, data is organized into shared types such as maps, arrays, and text. These types
State synchronization in YDoc is achieved through exchanging binary updates. Changes can be encoded as updates
YDoc is typically used with network providers to connect clients, such as y-websocket or y-webrtc, and is