This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-05
Channels
- # admin-announcements (10)
- # beginners (18)
- # boot (29)
- # capetown (2)
- # cider (46)
- # cljs-dev (1)
- # cljsrn (69)
- # clojure (126)
- # clojure-android (9)
- # clojure-gamedev (3)
- # clojure-greece (16)
- # clojure-poland (13)
- # clojure-russia (45)
- # clojure-spec (27)
- # clojure-uk (21)
- # clojurescript (99)
- # cursive (1)
- # datascript (1)
- # datomic (42)
- # functionalprogramming (10)
- # hoplon (47)
- # instaparse (12)
- # jobs (5)
- # jobs-rus (9)
- # keechma (22)
- # lein-figwheel (8)
- # leiningen (5)
- # luminus (1)
- # mount (7)
- # off-topic (1)
- # om (15)
- # onyx (47)
- # other-languages (14)
- # planck (28)
- # proton (8)
- # re-frame (30)
- # reagent (15)
- # remote-jobs (3)
- # slack-help (2)
- # untangled (9)
- # yada (6)
@richiardiandrea: ^{:on-reload :noop}
will disable stopping or starting the state on a namespace recompilation. however it would still obey (mount/start)
/ (mount/stop)
calls.
which means if any of the namespaces with (mount/start)
/ (mount/stop)
calls are reloaded, and these calls are executed (i.e. somewhere in dev namespace or anywhere else), the state's start/stop functions will be called.
@richiardiandrea: when you call clojure.tools/refresh
, most likely you call (mount/stop)
=> (mount/start)
as the result (this is my guess), hence all of your states are "restarted"
i.e. ^{:on-reload :noop}
says "whenever the app is started, in case a namespace that has me is recompiled, do nothing with me"
@tolitius: that's exactly what happens, as I call the classic (go)
function in :after
. I was not aware of the difference
I thought it was a "disable-it-for-real" kind of a thing, and mount/start
knew about it as well
now it's clearer that if I want to avoid that reloading, I also need to mount/start-without
that state