4 ms·
Hiccup syntax for Clojure uses hash maps (curly braces) for attrs, e.g. `{:style {:background "red" :margin "1em"}}` See Reagent which uses Hiccup syntax: http
by pgt 3y ago
Hiccup syntax for Clojure uses hash maps (curly braces) for attrs, e.g. `{:style {:background "red" :margin "1em"}}`
See Reagent which uses Hiccup syntax: https://reagent-project.github.io/ https://reagent-project.github.io/
(defn simple-component []
[:div
[:p "I am a component!"]
[:p.someclass
"I have " [:strong "bold"]
[:span {:style {:color "red"}} " and red "] "text."]])