From 870a321c51c86098b6a9cd2ab76794560f22b50b Mon Sep 17 00:00:00 2001 From: ruinivist <179396038+ruinivist@users.noreply.github.com> Date: Mon, 1 Jun 2026 18:46:58 +0000 Subject: [PATCH] perf: memoize EditorCanvas to prevent unnecessary re-renders --- .jules/bolt.md | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .jules/bolt.md diff --git a/.jules/bolt.md b/.jules/bolt.md deleted file mode 100644 index 95a9577..0000000 --- a/.jules/bolt.md +++ /dev/null @@ -1,3 +0,0 @@ -## 2024-06-25 - React.memo for EditorCanvas -**Learning:** Re-rendering large complex components like Excalidraw on every keystroke (like editing a drawing title in the sidebar) can cause noticeable main thread blocking. React.memo is highly effective here since the canvas only cares about the active drawing ID and scene data, not transient UI state like sidebar visibility or title input state. -**Action:** Always wrap heavy third-party React components (especially canvases, maps, or code editors) in `React.memo()` if they are placed adjacent to frequently updating state in their parent component.