Reagent: Minimalistic React for ClojureScript

Reagent: Intro News GitHub Reagent provides a minimalistic 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. The goal of Reagent is to make it possible to define arbitrarily complex UIs using just a couple of basic concepts, and to be fast enough by default that you rarely have to care about performance. A very basic Reagent component may look something like this: hide I am a component! I have bold and red text. ( defn simple-component [ ] [ :div [ :p "I am a component!" ] [ :p.someclass "I have " [ :strong "bold" ] [ :span { :style { :color "red" } } " and red " ] "text." ] ] ) You can build new components using other components as building blocks. Like this: hide I include simple...

Linked on 2014-12-01 22:29:27 | Similar Links