From 71047c2dc5e12b24f59892b2e410346a661b6f49 Mon Sep 17 00:00:00 2001 From: Robin Nagpal Date: Mon, 30 Jul 2018 15:35:28 -0400 Subject: [PATCH] local experiments --- project.clj | 2 +- src/reagent/ratom.cljs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/project.clj b/project.clj index 68ceefb..30dea30 100644 --- a/project.clj +++ b/project.clj @@ -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"] diff --git a/src/reagent/ratom.cljs b/src/reagent/ratom.cljs index 393e6c6..baf3a78 100644 --- a/src/reagent/ratom.cljs +++ b/src/reagent/ratom.cljs @@ -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))