(defn
wrap-funs
[fmap]
(when
(dev?)
(let
[renders
(select-keys fmap [:render :reagentRender :componentFunction])
render-fun
(-> renders vals first)]
(assert (pos? (count renders)) "Missing reagent-render")
(assert (== 1 (count renders)) "Too many render functions supplied")
(assert-callable render-fun)))
(let
[render-fun
(or (:reagentRender fmap) (:componentFunction fmap))
legacy-render
(nil? render-fun)
render-fun
(or render-fun (:render fmap))
name
(str (or (:displayName fmap) (util/fun-name render-fun)))
name
(case name "" (str (gensym "reagent")) name)
fmap
(reduce-kv (fn [m k v] (assoc m k (get-wrapper k v name))) {} fmap)]
(assoc
fmap
:displayName
name
:autobind
false
:cljsLegacyRender
legacy-render
:reagentRender
render-fun
:render
(:render static-fns))))