Build the UI with Reagent
Reagent is a ClojureScript UI component library built on top of the popular Facebook React library. Reagent provides a way to define UI elements using Hiccup-style syntax for DOM representation. Each UI component is a data structure that represents a particular DOM element. By taking a DOM-centric view of the UI, Reagent provides a way to write composable components.
To build our UI, we first add the Reagent dependency to our project:
Let’s start the lein-cljsbuild plugin using the auto mode so that it watches for changes in the source and automatically recompiles it as we go. Nothing to it. Just open a new terminal and run the following command:
|||lein cljsbuild ...|