Virtual whiteboard for sketching hand-drawn like diagrams
add explanation for why we mutate collaborators state (#2028)
Warren Seine2cb8ba6521f5
diff --git a/src/components/App.tsx b/src/components/App.tsxindex 3644ffee63..ec08b46738 100644--- a/src/components/App.tsx+++ b/src/components/App.tsx@@ -1299,6 +1299,8 @@ class App extends React.Component<ExcalidrawProps, AppState> {username,selectedElementIds,} = decryptedData.payload;+ // NOTE purposefully mutating collaborators map in case of+ // pointer updates so as not to trigger LayerUI rerenderthis.setState((state) => {if (!state.collaborators.has(socketID)) {state.collaborators.set(socketID, {});