memoize EditorCanvas to prevent unnecessary re-renders

This commit is contained in:
2026-06-02 00:26:01 +05:30
committed by GitHub
parent 95d27c5142
commit 459993a78d
+3 -2
View File
@@ -1,3 +1,4 @@
import { memo } from "react";
import "../../../node_modules/@excalidraw/excalidraw/dist/prod/index.css";
import { Excalidraw } from "@excalidraw/excalidraw";
import type {
@@ -33,7 +34,7 @@ function sceneFromEditor(
};
}
export function EditorCanvas({
export const EditorCanvas = memo(function EditorCanvas({
activeId,
scene,
loading,
@@ -58,4 +59,4 @@ export function EditorCanvas({
/>
</div>
);
}
});