mirror of https://github.com/status-im/reagent.git
wip
This commit is contained in:
parent
02be9425e5
commit
0634806104
|
@ -47,6 +47,7 @@
|
|||
{:compiler {:optimizations :advanced
|
||||
:elide-asserts true
|
||||
:pretty-print false
|
||||
;; :pseudo-names true
|
||||
:output-dir "target/client"}}}}}]
|
||||
|
||||
:prod-test [:test :prod]
|
||||
|
|
|
@ -211,12 +211,17 @@
|
|||
(when (== ra.dirty? maybe-dirty)
|
||||
(set! ra.norun? true)
|
||||
(doseq [w ra.watching]
|
||||
(when (reaction? w)
|
||||
(when (and (reaction? w)
|
||||
(not (identical? (.-dirty? w) clean)))
|
||||
(-deref w)))
|
||||
(set! ra.norun? false)
|
||||
(when (== ra.dirty? maybe-dirty)
|
||||
(set! ra.dirty? clean))))
|
||||
|
||||
(defn- ra-run-check [ra]
|
||||
(binding [*ratom-context* (js-obj)]
|
||||
(ra-check-clean ra)))
|
||||
|
||||
(defn- ra-handle-change [ra sender oldval newval]
|
||||
(when ra.active?
|
||||
(let [old-dirty ra.dirty?]
|
||||
|
@ -229,8 +234,7 @@
|
|||
(do
|
||||
;; FIXME: is this correct?
|
||||
(when (== ra.dirty? maybe-dirty)
|
||||
(binding [*ratom-context* (js-obj)]
|
||||
(ra-check-clean ra)))
|
||||
(ra-run-check ra))
|
||||
(when-not (== ra.dirty? clean)
|
||||
((or ra.auto-run run) ra)))
|
||||
(when (== old-dirty clean)
|
||||
|
|
Loading…
Reference in New Issue