call clear-subscription-cache! on code reload
- as per changes of re-frame 0.9.0
This commit is contained in:
parent
999615e921
commit
750747d638
|
@ -1,5 +1,6 @@
|
||||||
(ns ^:figwheel-no-load env.$PLATFORM$.main
|
(ns ^:figwheel-no-load env.$PLATFORM$.main
|
||||||
(:require [reagent.core :as r]
|
(:require [reagent.core :as r]
|
||||||
|
[re-frame.core :refer [clear-subscription-cache!]]
|
||||||
[$PROJECT_NAME_HYPHENATED$.$PLATFORM$.core :as core]
|
[$PROJECT_NAME_HYPHENATED$.$PLATFORM$.core :as core]
|
||||||
[figwheel.client :as figwheel :include-macros true]))
|
[figwheel.client :as figwheel :include-macros true]))
|
||||||
|
|
||||||
|
@ -9,9 +10,13 @@
|
||||||
(defn reloader [] @cnt [core/app-root])
|
(defn reloader [] @cnt [core/app-root])
|
||||||
(def root-el (r/as-element [reloader]))
|
(def root-el (r/as-element [reloader]))
|
||||||
|
|
||||||
|
(defn force-reload! []
|
||||||
|
(clear-subscription-cache!)
|
||||||
|
(swap! cnt inc))
|
||||||
|
|
||||||
(figwheel/watch-and-reload
|
(figwheel/watch-and-reload
|
||||||
:websocket-url "ws://$DEV_HOST$:3449/figwheel-ws"
|
:websocket-url "ws://$DEV_HOST$:3449/figwheel-ws"
|
||||||
:heads-up-display false
|
:heads-up-display false
|
||||||
:jsload-callback #(swap! cnt inc))
|
:jsload-callback force-reload!)
|
||||||
|
|
||||||
(core/init)
|
(core/init)
|
Loading…
Reference in New Issue