Remove support for refs for now

It shouldn't be necessary for Cloact, since we can share data
between components using atoms. And it was broken and untested
anyway...
This commit is contained in:
Dan Holmsand 2014-01-03 16:38:28 +01:00
parent a0aa670c79
commit af45084966
3 changed files with 4 additions and 10 deletions

View File

@ -51,9 +51,6 @@
(defn dom-node [comp]
(.getDOMNode comp))
(defn refs [comp]
(aget comp "refs")
#_(.-refs comp))
(defn merge-props

View File

@ -134,10 +134,7 @@
(when (map? props)
(let [key (:key props)]
(when-not (nil? key)
(set! (.-key obj) key)))
(let [ref (:ref props)]
(when-not (nil? ref)
(set! (.-ref obj) ref))))
(set! (.-key obj) key))))
(c obj)))
(defn map-into-array [f coll]

View File

@ -208,9 +208,9 @@ Hiccup-like syntax."]
[:div
[:h2 "Essential API"]
[:p "Cloact supports (almost) the entire React API, but there is
really only one entry-point that is necessary for most
applications: " [:code "cloact.core/render-component"] "."]
[:p "Cloact supports most of React's API, but there is really only
one entry-point that is necessary for most applications: "
[:code "cloact.core/render-component"] "."]
[:p "It takes too arguments: a component, and a DOM node. For
example, splashing the very first example all over the page would