     (assert tag (str "Unknown tag: '" hiccup-tag "'"))
     [tag (when (or id class')
            [id class'])]))
-
-(defn get-wrapper [tag]
-  (let [[comp id-class] (parse-tag tag)]
-    (wrap-component comp id-class (str tag))))
-
-(def cached-wrapper (util/memoize-1 get-wrapper))
 
 (defn fn-to-class [f]
   (assert (ifn? f) (str "Expected a function, not " (pr-str f)))

    wrapf))

(defn as-class [tag]
  (if (hiccup-tag? tag)
    (cached-wrapper tag)
    (let [cached-class (util/cached-react-class tag)]
      (if-not (nil? cached-class)
        cached-class
        (fn-to-class tag)))))

(def cached-parse (util/memoize-1 parse-tag))

(defn native-element [tag argv]
  (when (hiccup-tag? tag)
    (let [[comp id-class] (cached-parse tag)]
      (when-not (input-component? comp)
        (let [props (nth argv 1 nil)
              hasprops (or (nil? props) (map? props))
              jsprops (convert-props (if hasprops props) id-class true)]
          ;; TODO: Meta key
          (make-element argv comp jsprops
                        (if hasprops 2 1)))))))

(defn get-key [x]
  (when (map? x) (get x :key)))

    (.! this :cljsInputValue nil)))

(defn input-component? [x]
  (or (= x "input")
      (= x "textarea")))

(def reagent-input-class nil)

(declare make-element)

(def input-spec
  {:display-name "ReagentInput"
   :component-did-update input-set-value
   :component-will-unmount input-unmount
   :component-function
   (fn [argv comp jsprops first-child]
     (let [this comp/*current-component*]
       (input-render-setup this jsprops)
       (make-element argv comp jsprops first-child)))})

(defn reagent-input [argv comp jsprops first-child]
  (when (nil? reagent-input-class)
    (set! reagent-input-class
          (comp/create-class input-spec)))
  (reagent-input-class argv comp jsprops first-child))


;;; Conversion from Hiccup forms
