24 lines
682 B
Clojure
24 lines
682 B
Clojure
(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]))
|
|
|
|
(enable-console-print!)
|
|
|
|
(def cnt (r/atom 0))
|
|
(defn reloader [] @cnt [core/app-root])
|
|
|
|
;; Do not delete, root-el is used by the figwheel-bridge.js
|
|
(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 force-reload!)
|
|
|
|
(core/init) |