mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 05:56:38 +02:00
Add equality check for local mixin for avoid rerenders.
This commit is contained in:
parent
dae971a96c
commit
2fed551cf1
1 changed files with 3 additions and 2 deletions
|
@ -119,8 +119,9 @@
|
||||||
(let [local-state (atom initial)
|
(let [local-state (atom initial)
|
||||||
component (:rum/react-component state)]
|
component (:rum/react-component state)]
|
||||||
(add-watch local-state key
|
(add-watch local-state key
|
||||||
(fn [_ _ _ _]
|
(fn [_ _ oldv newv]
|
||||||
(rum/request-render component)))
|
(when (not= oldv newv)
|
||||||
|
(rum/request-render component))))
|
||||||
(assoc state key local-state)))
|
(assoc state key local-state)))
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue