More performance improvements

This commit is contained in:
alonso.torres 2021-01-26 12:02:00 +01:00
parent 07d552c86b
commit cf77ebde6a
7 changed files with 141 additions and 104 deletions

View file

@ -24,7 +24,8 @@
(let [shape (unchecked-get props "shape")
background? (unchecked-get props "background?")
{:keys [id x y width height]} (:selrect shape)
pdata (ugp/content->path (:content shape))
content (:content shape)
pdata (mf/use-memo (mf/deps content) #(ugp/content->path content))
props (-> (attrs/extract-style-attrs shape)
(obj/merge!
#js {:d pdata}))]