Description:
If a user temporarily loses WiFi, their local Yjs state might clash or miss updates when they reconnect.
How to Implement:
- IndexedDB Provider: Install and configure
y-indexeddb. Bind it to the same Y.Doc as your y-websocket or y-webrtc provider.
- Local Persistence: This ensures all changes made offline are immediately written to local storage.
- Reconnection Sync: When the WebSocket connection restores, Yjs will automatically compute the state vectors and sync the locally cached offline edits with the remote peers securely.
Description:
If a user temporarily loses WiFi, their local Yjs state might clash or miss updates when they reconnect.
How to Implement:
y-indexeddb. Bind it to the sameY.Docas youry-websocketory-webrtcprovider.