mirror of https://github.com/status-im/reagent.git
Fix mount ordering to be more robust
This commit is contained in:
parent
25adadba66
commit
c030cf7266
|
@ -27,8 +27,8 @@
|
|||
fake-raf))))
|
||||
|
||||
(defn compare-mount-order [c1 c2]
|
||||
(- (.' c2 :cljsMountOrder)
|
||||
(.' c1 :cljsMountOrder)))
|
||||
(- (.' c1 :cljsMountOrder)
|
||||
(.' c2 :cljsMountOrder)))
|
||||
|
||||
(defn run-queue [a]
|
||||
;; sort components by mount order, to make sure parents
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
(this-as c
|
||||
(f c (.' oldprops :argv))))
|
||||
|
||||
:componentDidMount
|
||||
:componentWillMount
|
||||
(fn []
|
||||
(this-as c
|
||||
(.! c :cljsMountOrder (batch/next-mount-count))
|
||||
|
@ -145,7 +145,7 @@
|
|||
(or wrap (default-wrapper f)))))
|
||||
|
||||
(def obligatory {:shouldComponentUpdate nil
|
||||
:componentDidMount nil
|
||||
:componentWillMount nil
|
||||
:componentWillUnmount nil})
|
||||
|
||||
(def dash-to-camel (util/memoize-1 util/dash-to-camel))
|
||||
|
|
Loading…
Reference in New Issue