-
Notifications
You must be signed in to change notification settings - Fork 10
defcomp
jiyinyiyong edited this page Apr 4, 2020
·
6 revisions
(defcomp comp-demo [content]
(div
{:class-name "demo-container"
:style {:color :red}}
(<> content)))
defcomp
is a Macro(https://github.com/Respo/respo/blob/master/macros/respo/core.clj) transforming code to:
(defn comp-comp [content]
(merge respo.schema/component
{:args (list content),
:name :comp-name,
:render (fn [content]
(div
{:class-name "demo-container"
:style {:color :red}}
(<> content)))})))