mirror of https://github.com/status-im/reagent.git
local experiments
This commit is contained in:
parent
8febef26c0
commit
71047c2dc5
|
@ -23,7 +23,7 @@
|
|||
:exclude clojure.string
|
||||
:source-paths ["src"]}
|
||||
|
||||
:profiles {:dev {:dependencies [[org.clojure/clojurescript "1.10.238"]
|
||||
#_#_:profiles {:dev {:dependencies [[org.clojure/clojurescript "1.10.238"]
|
||||
[figwheel "0.5.16"]
|
||||
[doo "0.1.10"]
|
||||
[com.google.javascript/closure-compiler-unshaded "v20180319"]
|
||||
|
|
|
@ -337,7 +337,15 @@
|
|||
(defn- handle-reaction-change [this sender old new]
|
||||
(._handle-change this sender old new))
|
||||
|
||||
|
||||
;; Fields of a Reaction javascript object
|
||||
;; - auto_run
|
||||
;; - captured
|
||||
;; - caught
|
||||
;; - f
|
||||
;; - ratomGeneration
|
||||
;; - state
|
||||
;; - watches
|
||||
;; - watching
|
||||
(deftype Reaction [f ^:mutable state ^:mutable ^boolean dirty? ^boolean nocache?
|
||||
^:mutable watching ^:mutable watches ^:mutable auto-run
|
||||
^:mutable caught]
|
||||
|
@ -498,8 +506,11 @@
|
|||
|
||||
|
||||
(def ^:private temp-reaction (make-reaction nil))
|
||||
(js/console.log "temp-reaction" temp-reaction)
|
||||
|
||||
|
||||
(defn run-in-reaction [f obj key run opts]
|
||||
(js/console.log "run-in-reaction" temp-reaction)
|
||||
(let [r temp-reaction
|
||||
res (deref-capture f r)]
|
||||
(when-not (nil? (.-watching r))
|
||||
|
|
Loading…
Reference in New Issue