4 ms·
Do you use hiccup as well as Reagent? Or must you commit to one or the other? Which do you prefer?
by elliotec 12y ago
Do you use hiccup as well as Reagent? Or must you commit to one or the other? Which do you prefer?
- handojin 12y agoThere's a hiccup like syntax within reagent which produces output via clojurescript. So (:div (... )) in your cljs.core turns into a react component. There's also kioo if you like the enlive approach better.
- deleted 12y ago[deleted]
- escherize 12y agoPeople use 'hiccup syntax' to mean the [:h2 "okay"] style of datastructures. Hiccup is actually the name of the (first?) clojure library that parses [:p.tall "hi"] into: <p class="tall">hi</p> . Reagent is a clojurescript library that lets one write a Single Page App as clojure datastructures. Most of what reagent does is take a function that returns 'hiccup syntax' and turns it into a react.js component. One can also create components using Reagent by hooking into the :component-did-mount events.