mirror of
https://github.com/status-im/reagent.git
synced 2025-02-24 01:28:10 +00:00
Make should-component-update a little faster for :style attrs
This commit is contained in:
parent
b45a215f52
commit
344e9e5db5
@ -56,12 +56,12 @@
|
|||||||
(reduce-kv (fn [res k v]
|
(reduce-kv (fn [res k v]
|
||||||
(let [yv (get y k -not-found)]
|
(let [yv (get y k -not-found)]
|
||||||
(if (or (keyword-identical? v yv)
|
(if (or (keyword-identical? v yv)
|
||||||
;; hack to allow reagent.core/partial and :style
|
;; Allow :style maps and reagent/partial
|
||||||
;; maps to be compared with =
|
;; and :style maps to be compared properly
|
||||||
(and (or
|
(and (keyword-identical? k :style)
|
||||||
(keyword-identical? k :style)
|
(shallow-equal-maps v yv))
|
||||||
(identical? (type v) partial-ifn))
|
(and (identical? (type v) partial-ifn)
|
||||||
(= v yv)))
|
(= y yv)))
|
||||||
res
|
res
|
||||||
(reduced false))))
|
(reduced false))))
|
||||||
true x))))
|
true x))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user