Fix mount ordering to be more robust

This commit is contained in:
Dan Holmsand 2014-12-01 14:27:51 +01:00
parent 25adadba66
commit c030cf7266
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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))