From cbee921cb3a24a0fd985cda1a8c202ef1f44883d Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Sun, 16 Nov 2014 12:28:48 -0500 Subject: [PATCH] Update DOM.md --- DOM.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DOM.md b/DOM.md index 8876e2d..b04ba34 100644 --- a/DOM.md +++ b/DOM.md @@ -1,7 +1,9 @@ # freactive *pronounced "F-reactive"* -freactive is a pure Clojurescript DOM library inspired by work done in reagent, om and reflex (as well as desktop GUI frameworks like QML and JavaFX). It uses hiccup-style syntax and Clojure's built-in deref and atom patterns. +freactive is a high-performance, pure Clojurescript, declarative DOM library. It uses hiccup-style syntax and Clojure's built-in deref and atom patterns. It is inspired by work done in reagent, om and reflex (as well as desktop GUI frameworks like QML and JavaFX). + +[See it in action](http://aaronc.github.io/freactive/) **Goals:** * Provide a **dead-simple API** that is intuitive and almost obvious for those familiar with Clojure (similar to Reagent) @@ -43,8 +45,6 @@ freactive is a pure Clojurescript DOM library inspired by work done in reagent, If you already understand hiccup DOM syntax and Clojure's `atom`, you're 90% there. In freactive, make sure you 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). We just need to introduce one additional concept - the macro `rx` (for reactive expression). - - 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.) Passing an `rx` or reactive `atom` (or any `IDeref` instance) as an attribute, style property or child of a DOM element represented via a hiccup vector binds it to that attribute, style property or child node position. freactive makes sure that any updates to `rx`'s or `atom`'s are propogated to the DOM directly to the binding site only as often as necessary (coordinated with `requestAnimationFrame`).