Quick question: Does it make sense to use mount in a figwheel environment? If so, how do mount start and stop play with figwheel’s recommended use of defonce? Probably a stupid question, I know!
@grumplet I mostly use https://github.com/adzerk-oss/boot-reload but as far as figwheel goes, whenever the page / namespace reloads, mount would stop/start (i.e. restart) corresponding states. for example, in case you have a web socket connection, and you changed a namespace where this connection is defined, mount will reconnect on reload. In case you load something from the server and keep it within a mount state, mount will reload it in case a namespace (that state belongs to) is reloaded. there are also options to suggest mount not to restart / reload certain states: https://github.com/tolitius/mount#recompiling-namespaces-with-running-states
@tolitius. OK thanks for that explanation 🙂
@grumplet sure 🙂
I'm a bit confused about :on-reload :noop, when I reload a namespace with a noop state in it, it seems mount/stop forgets about it
Is that expected?
By that I mean, it doesn't get stopped and started on the reload, as expected, but then after that, when I actually call mount/stop, it already shows up as stopped, even though it's still running, and the next mount/start fails since the port is already bound