Doc for with-let

This commit is contained in:
Dan Holmsand 2015-12-21 07:43:21 +01:00
parent b4dec115b2
commit 4dd57c0dfb
2 changed files with 5 additions and 1 deletions

View File

@ -10,7 +10,7 @@
(defn main []
[:div
;; [news060/main {:summary true}]
[news060/main {:summary true}]
[news051/main {:summary true}]
[news050/main {:summary true}]
[clock/main {:summary true}]

View File

@ -2,4 +2,8 @@
(:require [reagent.ratom :as ra]))
(defmacro with-let [bindings & body]
"Bind variables as with let, except that when used in a component
the bindings are only evaluated once. Also takes an optional finally
clause at the end, that is executed when the component is
destroyed."
`(ra/with-let ~bindings ~@body))