mirror of https://github.com/status-im/reagent.git
Doc for with-let
This commit is contained in:
parent
b4dec115b2
commit
4dd57c0dfb
|
@ -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}]
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue