This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-20
Channels
- # bangalore-clj (3)
- # beginners (30)
- # boot (117)
- # braid-chat (6)
- # carry (9)
- # cider (6)
- # clara (11)
- # cljs-dev (28)
- # cljsrn (12)
- # clojars (2)
- # clojure (114)
- # clojure-austin (2)
- # clojure-dev (1)
- # clojure-dusseldorf (1)
- # clojure-greece (47)
- # clojure-italy (5)
- # clojure-russia (79)
- # clojure-spec (121)
- # clojure-uk (133)
- # clojurescript (92)
- # community-development (67)
- # copenhagen-clojurians (1)
- # core-async (25)
- # cursive (67)
- # datascript (1)
- # datomic (34)
- # devcards (24)
- # emacs (8)
- # funcool (71)
- # juxt (1)
- # keechma (2)
- # lein-figwheel (6)
- # luminus (8)
- # mount (17)
- # om (135)
- # om-next (13)
- # onyx (147)
- # pedestal (11)
- # planck (7)
- # re-frame (42)
- # reagent (86)
- # rum (11)
- # specter (6)
- # testing (6)
- # untangled (1)
- # vim (6)
- # yada (24)
I have a curious problem with my Figwheel configuration. In my core namespace, I have two relevant functions:
(defn mount-root []
(reagent/render [views/main-panel]
(.getElementById js/document "app")))
(defn ^:export init []
(re-frame/dispatch-sync [:initialize-db])
(dev-setup)
(mount-root))
And my figwheel config is correctly set up to run only mount-root
on change:
cljs.user=> (print-config dev)
{:id "dev",
:source-paths ["src/cljc" "src/cljs"],
:figwheel {:on-jsload "mazes.web.core/mount-root", :build-id "dev"},
(build options omitted, because that's all proven to be working)And yet, whenever I change a file, it's definitely running the init
function. That function is invoked in a script tag at the top of the HTML page, but I can't see why it should be invoked again.
...actually it's running init
and then mount-root
. Something's afoot.
Not sure what I did to fix this, but restarting and reloading various things was eventually enough to kick it back onto track. Glad it's working, but I don't like not knowing why.
Anyone else seeing a lot of warnings about document.write() in recent Chrome stable versions? Seems to be this: https://developers.google.com/web/updates/2016/08/removing-document-write?hl=en