Update DOM.md
This commit is contained in:
parent
899918f8f6
commit
1772f2885a
1 changed files with 1 additions and 1 deletions
2
DOM.md
2
DOM.md
|
@ -51,7 +51,7 @@ To try this quickly, you can install the [austin](https://github.com/cemerick/au
|
|||
|
||||
If you already understand [hiccup syntax](https://github.com/weavejester/hiccup#syntax) and Clojure's [`atom`](http://clojure.org/atoms), you're 90% of the way to understanding freactive.
|
||||
|
||||
**Reactive atoms:** 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 - an `rx` in this case. (This is exactly the same idea as in [reagent][reagent] and I believe originally came from [reflex][reflex]).
|
||||
**Reactive atoms:** In freactive, instead of Clojure's atom, you use freactive's reactive `atom` which allows `deref`'s to be captured by an enclosing reactive expression - an `rx` in this case. (This is exactly the same idea as in [reagent][reagent] and I believe originally came from [reflex][reflex]).
|
||||
|
||||
**The `rx` macro**: the `rx` macro returns an `IDeref` instance (can be `deref`'ed with `@`) whose value is the body of the expression. This value gets updated when (and only when) one of the dependencies captured in its body (reactive `atom`s, other `rx`'s and also things like `cursor`'s) gets "invalidated". (Pains were taken to make this invalidation process as efficient and configurable as possible.)
|
||||
|
||||
|
|
Loading…
Reference in a new issue