The React tutorial rewritten in Om
Like many, swannodette's post about the release of Om got me really excited. Check out the post if you haven't.
I worked through the React tutorial yesterday in JS(X), and did it today in Om. I would definitely recommend doing it in that order.
I've tried to stay really close in concept to the original tutorial, but made the following substitutions to be as idiomatic as possible:
- jQuery (ajax) -> clj-http
- Showdown (markdown) -> markdown-clj
The original react tutorial repo includes a nodejs server; therefore, this one has a Clojure one. run lein ring server
to fire it up.
For getting the latest version of CLJS and Om, follow swannodette's instructions here.
- Client:
lein cljsbuild once dev
- Server:
lein ring server
I can't for the life of me get the markdown to actually render. Attempts at getting <span dangerouslySetInnerHTML={{__html: rawMarkup}} />
to work in Om have failed thus far -- any ideas on how to go about this would be much appreciated.