clojurescript Getting Started with Reagent UI using Reagent and Hiccup


Example

Reagent is an interface between ClojureScript and react. It allows you to define efficient React components using nothing but plain ClojureScript functions and data, that describe your UI using a Hiccup-like syntax.

Example:-

(defn sample-component []
  [:div
   [:p "I am a component!"]
   [:p.someclass
    "I have " [:strong "bold"] "text."]])

Output:

I am a component!

I have bold text.