Yjs Collaboration
Add real-time collaboration to Spreadsheet 2 using Yjs
There are two ways we can use yjs collaboration
Sending patches to yjs document and synchorizing these patches between users
Saving the entire data, like sheetData, sheets in yjs document. More performance and easy to restore an entire document
You can install Yjs hook as a separate module
Initializing Yjs
This hook uses WebSocketProvider
from Yjs to initialize a connection to one of the demo servers wss://demos.yjs.dev
The default provider can be easily switched to WebRTCProvider, but as of right now, WebRTC does not support synced
events.
Running yjs locally
Last updated