Update for re-frame 0.9.0

This commit is contained in:
Daniel Compton 2016-12-16 14:45:28 +13:00
parent f7b4d9bffc
commit 8c95ebad3c
3 changed files with 6 additions and 7 deletions

View File

@ -5,7 +5,7 @@
:dependencies [[org.clojure/clojure "1.8.0"] :dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.227"] [org.clojure/clojurescript "1.9.227"]
[reagent "0.6.0"] [reagent "0.6.0"]
[re-frame "0.9.0-alpha1"] [re-frame "0.9.0"]
[cljsjs/d3 "4.2.2-0"]] [cljsjs/d3 "4.2.2-0"]]
:deploy-repositories {"releases" :clojars :deploy-repositories {"releases" :clojars
"snapshots" :clojars} "snapshots" :clojars}

View File

@ -9,7 +9,6 @@
[reagent.impl.component :as component] [reagent.impl.component :as component]
[reagent.impl.batching :as batch] [reagent.impl.batching :as batch]
[reagent.ratom :as ratom] [reagent.ratom :as ratom]
[re-frame.utils :as rutils]
[goog.object :as gob] [goog.object :as gob]
[re-frame.interop :as interop] [re-frame.interop :as interop]
@ -42,9 +41,9 @@
(._run rat false)) (._run rat false))
cljs-ratom ($ c :cljsRatom)] ;; actually a reaction cljs-ratom ($ c :cljsRatom)] ;; actually a reaction
(trace/merge-trace! (trace/merge-trace!
{:tags {:reaction (rutils/reagent-id cljs-ratom) {:tags {:reaction (interop/reagent-id cljs-ratom)
:input-signals (when cljs-ratom :input-signals (when cljs-ratom
(map rutils/reagent-id (gob/get cljs-ratom "watching" :none)))}}) (map interop/reagent-id (gob/get cljs-ratom "watching" :none)))}})
res)))))}) res)))))})
@ -76,7 +75,7 @@
(trace/with-trace {:op-type key (trace/with-trace {:op-type key
:operation (last (str/split (comp-name c) #" > ")) :operation (last (str/split (comp-name c) #" > "))
:tags {:component-path (reagent.impl.component/component-path c) :tags {:component-path (reagent.impl.component/component-path c)
:reaction (rutils/reagent-id ($ c :cljsRatom))}}) :reaction (interop/reagent-id ($ c :cljsRatom))}})
(.call (real-custom-wrapper key f) c c))) (.call (real-custom-wrapper key f) c c)))
(real-custom-wrapper key f)))) (real-custom-wrapper key f))))

View File

@ -3,7 +3,7 @@
[day8.re-frame.trace.d3 :as d3t] [day8.re-frame.trace.d3 :as d3t]
[day8.re-frame.trace.graph :as graph] [day8.re-frame.trace.graph :as graph]
[reagent.core :as r] [reagent.core :as r]
[re-frame.utils :as rutils] [re-frame.interop :as interop]
[re-frame.db :as db] [re-frame.db :as db]
[goog.object :as gob] [goog.object :as gob]
[clojure.set :as set])) [clojure.set :as set]))
@ -17,7 +17,7 @@
{:id 3 :group 2}] {:id 3 :group 2}]
:links [{:source 1 :target 2 :value 1}]})) :links [{:source 1 :target 2 :value 1}]}))
(def app-db-node {:id (rutils/reagent-id db/app-db) (def app-db-node {:id (interop/reagent-id db/app-db)
:title "app-db" :title "app-db"
:group 1 :group 1
:r 20 :r 20