diff --git a/src/reagent/core.cljs b/src/reagent/core.cljs index 43c1a24..2fe40ae 100644 --- a/src/reagent/core.cljs +++ b/src/reagent/core.cljs @@ -99,9 +99,10 @@ looking like this: :component-will-update (fn [this new-argv]) :component-did-update (fn [this old-argv]) :component-will-unmount (fn [this]) -:render (fn [this])} +:reagent-render (fn [args....]) ;; or :render (fn [this]) +} -Everything is optional, except :render. +Everything is optional, except either :reagent-render or :render. " [spec] (comp/create-class spec)) diff --git a/src/reagent/impl/template.cljs b/src/reagent/impl/template.cljs index c05c230..f4932ec 100644 --- a/src/reagent/impl/template.cljs +++ b/src/reagent/impl/template.cljs @@ -133,7 +133,7 @@ {:display-name "ReagentInput" :component-did-update input-set-value :component-will-unmount input-unmount - :component-function + :reagent-render (fn [argv comp jsprops first-child] (let [this comp/*current-component*] (input-render-setup this jsprops) @@ -167,7 +167,7 @@ "adapt-react-class instead: " (.' f :type) (comp/comp-name)) (let [spec (meta f) - withrender (assoc spec :component-function f) + withrender (assoc spec :reagent-render f) res (comp/create-class withrender) wrapf (util/cached-react-class res)] (util/cache-react-class f wrapf)