mirror of https://github.com/status-im/reagent.git
Clean up circular dependency avoidance
This commit is contained in:
parent
d276654ce4
commit
ff48b3653d
|
@ -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
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Reference in New Issue