yjs
约 1 分钟阅读
- yjs/yjsGitHubyjs/yjsyjs/yjs · Shared data types for building collaborative software · Providers · y-webrtc · y-websocket · y-indexeddb · y-libp2p笔记:yjs
- Shared data types for building collaborative software
- Providers
- y-webrtc
- y-websocket
- y-indexeddb
- y-libp2p
- y-dat
- 参考
- yjs/yjs/INTERNALS.mdGitHub 文件yjs/yjs/INTERNALS.md
- ueberdosis/hocuspocusGitHubueberdosis/hocuspocus
- yjs/y-websocket-serverGitHubyjs/y-websocket-serveryjs/yjs · Shared data types for building collaborative software · Providers · y-webrtc · y-websocket · y-indexeddb · y-libp2p笔记:yjs
- YousefED/Matrix-CRDTGitHubYousefED/Matrix-CRDT
- Matrix-CRDT Yjs provider
- MSC2477: User-defined ephemeral events in rooms #2477GitHub PRmatrix-org/matrix-spec-proposals#2477
import * as Y from 'yjs'
const ydoc = new Y.Doc()
const ymap = ydoc.getMap()
ymap.set('keyA', 'valueA')
const ydocRemote = new Y.Doc()
const ymapRemote = ydocRemote.getMap()
ymapRemote.set('keyB', 'valueB')
const update = Y.encodeStateAsUpdate(ydocRemote)
Y.applyUpdate(ydoc, update)
console.log(ymap.toJSON()) // => { keyA: 'valueA', keyB: 'valueB' }关联信息
反向链接、本文链接的其他页面和外部资料。
参考资料
GitHub6 条
- matrix-org/matrix-spec-proposals#2477github.com/matrix-org/matrix-spec-proposals/pull/2477
- ueberdosis/hocuspocusgithub.com/ueberdosis/hocuspocus
- yjs/y-websocket-servergithub.com/yjs/y-websocket-server
- yjs/yjsgithub.com/yjs/yjs
- yjs/yjs/INTERNALS.mdgithub.com/yjs/yjs/blob/main/INTERNALS.md
- YousefED/Matrix-CRDTgithub.com/YousefED/Matrix-CRDT