call clear-subscription-cache! on code reload

- as per changes of re-frame 0.9.0
This commit is contained in:
Artur Girenko 2017-04-30 09:59:02 +02:00
parent 999615e921
commit 750747d638
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
(ns ^:figwheel-no-load env.$PLATFORM$.main
(:require [reagent.core :as r]
[re-frame.core :refer [clear-subscription-cache!]]
[$PROJECT_NAME_HYPHENATED$.$PLATFORM$.core :as core]
[figwheel.client :as figwheel :include-macros true]))
@ -9,9 +10,13 @@
(defn reloader [] @cnt [core/app-root])
(def root-el (r/as-element [reloader]))
(defn force-reload! []
(clear-subscription-cache!)
(swap! cnt inc))
(figwheel/watch-and-reload
:websocket-url "ws://$DEV_HOST$:3449/figwheel-ws"
:heads-up-display false
:jsload-callback #(swap! cnt inc))
:jsload-callback force-reload!)
(core/init)