Minor performance enhancement on str concat opetations

And proper stringify of :key prop of react components
This commit is contained in:
Andrey Antukh 2022-02-24 23:45:24 +01:00 committed by Alonso Torres
parent f05518e357
commit 4c00c8f3ec
11 changed files with 55 additions and 46 deletions

View file

@ -9,6 +9,7 @@
[app.common.geom.point :as gpt]
[app.common.logging :as log]
[app.main.refs :as refs]
[app.main.ui.context :as ctx]
[app.util.dom :as dom]
[app.util.storage :refer [storage]]
[rumext.alpha :as mf]))
@ -23,7 +24,7 @@
(defn use-resize-hook
[key initial min-val max-val axis negate? resize-type]
(let [current-file-id (mf/deref refs/current-file-id)
(let [current-file-id (mf/use-ctx ctx/current-file-id)
size-state (mf/use-state (or (get-in @storage [::saved-resize current-file-id key]) initial))
parent-ref (mf/use-ref nil)