From 7751d9a69b46384a61c39968d67632b14aa0613f Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 22 Apr 2026 06:35:22 +0000 Subject: [PATCH] :zap: Remove spurious deps from toggle callbacks in text-menu* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit toggle-main-menu and toggle-more-options close over a state atom and need no external deps. The declared deps (main-menu-open? / more-options-open?) were unused inside the function bodies, causing each callback to be reallocated on every toggle — self-reinforcing churn. Drop the mf/deps calls to make both callbacks stable. Signed-off-by: Andrey Antukh --- .../src/app/main/ui/workspace/sidebar/options/menus/text.cljs | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs index 57c5e2f977..22f79291d5 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/text.cljs @@ -348,12 +348,10 @@ ;; --- Toggles toggle-main-menu (mf/use-fn - (mf/deps main-menu-open?) #(swap! menu-state* update :main-menu not)) toggle-more-options (mf/use-fn - (mf/deps more-options-open?) #(swap! menu-state* update :more-options not)) toggle-token-dropdown