4 ms·
We've been using Reagent[1], re-frame (events as frp)[2], and re-com (component library)[3] as layers of abstraction in a dsl for creating react components for
by escherize 11y ago
We've been using Reagent[1], re-frame (events as frp)[2], and re-com (component library)[3] as layers of abstraction in a dsl for creating react components for a while.
That dsl is called hiccup, and it's a way to deal with datastructures while building up (usually) html. In the case of reagent, hiccup -> [reagent] -> react-components.
We write functions that return data structures, that get turned into react components.
It's really awesome to be able to treat your UI as data and pure functions that act on data. Any list is simply a formatting function mapped over data at rest, usually a vector of maps.
[1] http://reagent-project.github.io http://reagent-project.github.io
[2] https://github.com/Day8/re-frame https://github.com/Day8/re-frame
[3] http://re-demo.s3-website-ap-southeast-2.amazonaws.com/ http://re-demo.s3-website-ap-southeast-2.amazonaws.com/
- Reefersleep 11y agoWho's "we"? What do you do? I'm trying to get into CLJS/Reagent/FRP (quite possibly re-frame) myself.
- escherize 11y agoThanks for asking! We are a startup: fetchh.io - feel free to make an account and poke around if you want to see what a newbie to frontend can do with Clojure knowledge on top of cljs/reagent/re-frame. The site's been live for a couple months.
- firepoet 11y agoThe "Get Ship Done" button on the FAQ points to the wrong spot. May want to fix that...
- escherize 11y agoThanks! I fixed it
- firepoet 11y agoTypo after adding shipment: "We match or beat AusPost's price - garanteed." should read "We match or beat AusPost's price - guaranteed."
- escherize 11y agoFixed, thanks. :)
- deleted 11y ago[deleted]
- firepoet 11y agoVery cool site, though! I'm particularly impressed with the address parsing and autofill.
- escherize 11y agoThanks. It's adapted from an example of the google places API. It was easy to drop in, but took a lot of work to make the UX work well. (users are easily confused) If you want to checkout some reagent best practices I'd take a look at the re-com live demo, esspecially its source.