Fork me on GitHub

@michael.w.jung this sounds strange to me - never seen issues with hot reloading


but you wouldn't combine w/ Figwheel - you would just use Figwheel and/or shadow-cljs if they seem to work better for you


(but still I suspect any hot-reloading issues you believe to exist would probably exist elsewhere)


it would be useful for you to elaborate a situation where it doesn't work


because the ns is definitely getting reloaded - but perhaps the way you have structured your code it only appears to not work

Michael Jung17:06:36

Yes, maybe I simply use it incorrectly. I have to say that I don’t yet fully understand how reloading works. My main function looks like this:

(defn ^:export -main [& args]
  (dispatch-sync [:initialize-db])
  (r/as-element [app-root]))
Maybe that is already problematic? Will the main function be called again on a reload? Should I rather do the initialization in a defonce expression?

Michael Jung17:06:40

I also suspect that my use of react navigation might interfere with hot reloading. For example: if I change something on one screen, I always have to go up one level and come back to the screen to see the effect.

Michael Jung18:06:10

Ok, it seems to me like -main is called again after a reload, because I can see its effects.


FWIW I don't believe in JS routers

yes 2

we just use core.match and move on

Michael Jung18:06:38

Could you elaborate on that a little? I’m not sure how an alternative would look like and how I’d get nice transitions between screens in that case.


oh you want the native transitions - but that alone might be futzing w/ hot-reloading


I don't know how react navigation works


I suspect whatever you are seeing you will see elsewhere


would need to look at the details of react navigation but don't have the time for that at the moment

Michael Jung20:06:46

No no, I don’t want you doing research to solve my problems. Native transitions would be nice. But they aren’t a must for me. I’d be interested in how your solution looks like. Do you simply have a conditional in your root component that will show the proper subcomponent depending on your application state?