@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
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])
(load-db-from-storage)
(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?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.
Ok, it seems to me like -main
is called again after a reload, because I can see its effects.
oh right
FWIW I don't believe in JS routers
we just use core.match
and move on
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
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?