Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you use hiccup as well as Reagent? Or must you commit to one or the other? Which do you prefer?


People 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.


There'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: