Update DOM.md

This commit is contained in:
Aaron Craelius 2014-11-16 13:53:24 -05:00
parent 8264c7638d
commit da23e7b792

4
DOM.md
View file

@ -19,7 +19,7 @@ freactive is a high-performance, pure Clojurescript, declarative DOM library. It
## Two-minute tutorial
[lein](http://leiningen.org) dependency:
**[Leiningen](http://leiningen.org) dependency info:**
[![Clojars Project](http://clojars.org/freactive/latest-version.svg)](http://clojars.org/freactive)
@ -46,6 +46,8 @@ freactive is a high-performance, pure Clojurescript, declarative DOM library. It
(dom/mount! root (view))
```
To try this quickly, you can install the [austin](https://github.com/cemerick/austin) repl plugin, run `austin-exec`, open up a browser with the provided URL provided by austin and execute the above code. This code is also compatible with [lein-figwheel](https://github.com/bhauman/lein-figwheel) - this is possibly the best approach for live Clojurescript development available now.
**Explanation:**
If you already understand [hiccup syntax](https://github.com/weavejester/hiccup#syntax) and Clojure's `atom`, you're 90% of the way to understanding freactive. In freactive, instead of Clojure's atom, you should use freactive's reactive `atom` which allows derefs to be captured by an enclosing reactive expression (this is exactly the same idea as in reagent).