(defn
fn-to-class
[f]
(assert-callable f)
(warn-unless
(not (and (react-class? f) (not (reagent-class? f))))
"Using native React classes directly in Hiccup forms "
"is not supported. Use create-element or "
"adapt-react-class instead: "
(let [n (util/fun-name f)] (if (empty? n) f n))
(comp-name))
(if
(reagent-class? f)
(cache-react-class f f)
(let
[spec
(meta f)
withrender
(assoc spec :reagent-render f)
res
(create-class withrender)]
(cache-react-class f res))))