Clean up circular dependency avoidance

This commit is contained in:
Dan Holmsand 2016-05-27 11:35:31 +02:00
parent d276654ce4
commit ff48b3653d
2 changed files with 5 additions and 4 deletions

View File

@ -77,9 +77,8 @@
sa
($! this :cljsState (ratom/atom nil)))))
;; ugly circular dependency
(defn as-element [x]
(js/reagent.impl.template.as-element x))
;; avoid circular dependency: this gets set from template.cljs
(defonce as-element nil)
;;; Rendering

View File

@ -99,7 +99,7 @@
;;; Specialization for input components
;; This gets set from dom.cljs
(def find-dom-node nil)
(defonce find-dom-node nil)
(defn input-unmount [this]
($! this :cljsInputValue nil))
@ -322,6 +322,8 @@
(satisfies? IPrintWithWriter x) (pr-str x)
:else x))
(set! comp/as-element as-element)
(defn expand-seq [s]
(let [a (into-array s)]
(dotimes [i (alength a)]