I would rewrite your firebase handler like this: (.on fb "value" (fn [d] (put! out (.-shoppers (.val d)))))
There is no need to spin up another go-block if you don't need blocking here, it's enough to just put things on a channel. On Wed, Jan 29, 2014 at 9:58 AM, Samuel Richardson <[email protected]>wrote: > I'm quite new to Clojure and ClojureScript in general. I've been working > through the Clojure koans, ClojureScript 101 blog post and the Om tutorial. > I'm now at the stage where I'm starting to cobble together my own scripts. > > I've created a gist here: https://gist.github.com/Rodeoclash/8683587 > > It's designed to listen to updates from Firebase and send them to a > channel. A listener then takes the data off the channel and writes it to > the console. > > This all works fine, what I'm looking for is critiques on how I could > write the code better. Could it be better destructed? Have I missed a macro > which would simplify what I'm doing. Is it basically written by an idiot > (likely yes!). > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
