diff --git a/src/reagent/impl/batching.cljs b/src/reagent/impl/batching.cljs index 31ad329..bd9fb57 100644 --- a/src/reagent/impl/batching.cljs +++ b/src/reagent/impl/batching.cljs @@ -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 diff --git a/src/reagent/impl/component.cljs b/src/reagent/impl/component.cljs index 483e09c..e76fbdf 100644 --- a/src/reagent/impl/component.cljs +++ b/src/reagent/impl/component.cljs @@ -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))