fix comparison
This commit is contained in:
parent
226a8b221b
commit
05698c4d5e
|
@ -56,16 +56,15 @@
|
||||||
:error? @error?
|
:error? @error?
|
||||||
:loaded? @loaded?}])])))
|
:loaded? @loaded?}])])))
|
||||||
|
|
||||||
(defn- compare-sources
|
(defn- compare-props
|
||||||
[old-props new-props]
|
[old-props new-props]
|
||||||
(let [old-source (oops/oget old-props :source)
|
(let [old-source (some-> old-props :source remove-port)
|
||||||
new-source (oops/oget new-props :source)]
|
new-source (some-> new-props :source remove-port)]
|
||||||
(and old-source
|
(and (= old-source new-source)
|
||||||
new-source
|
(= (dissoc old-props :source) (dissoc new-props :source)))))
|
||||||
(= (remove-port old-source) (remove-port new-source)))))
|
|
||||||
|
|
||||||
(def fast-image
|
(def fast-image
|
||||||
(-> internal-fast-image
|
(-> internal-fast-image
|
||||||
(reagent/reactify-component)
|
(reagent/reactify-component)
|
||||||
(rn/memo compare-sources)
|
(rn/memo compare-props)
|
||||||
(reagent/adapt-react-class)))
|
(reagent/adapt-react-class)))
|
||||||
|
|
Loading…
Reference in New Issue