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