We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1534f52 commit 72a92b7Copy full SHA for 72a92b7
client/src/components/Editor/index.tsx
@@ -79,6 +79,8 @@ function Editor() {
79
80
// crdt의 초기화와 소켓을 통해 전달받는 리모트 연산 처리
81
useEffect(() => {
82
+ socket.emit('mom-initialization');
83
+
84
socket.on('mom-initialization', (crdt) => {
85
syncCRDT(crdt);
86
server/socket/mom.ts
@@ -70,7 +70,9 @@ async function momSocketServer(io: Server) {
70
// 초기화에 필요한 정보 전달
71
const { structure } = await getMom(momId);
72
73
- socket.emit('mom-initialization', structure);
+ socket.on('mom-initialization', () => {
74
+ socket.emit('mom-initialization', structure);
75
+ });
76
});
77
}
78
0 commit comments