cljsrn

https://github.com/drapanjanas/re-natal | https://github.com/drapanjanas/re-natal/wiki/FAQ | https://github.com/condense/mercury-app/wiki | https://github.com/seantempesta/expo-cljs-template/ https://www.npmjs.com/package/create-expo-cljs-app
dnolen 2021-06-16T16:58:27.136400Z

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

dnolen 2021-06-16T16:59:24.137500Z

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

dnolen 2021-06-16T17:06:44.138100Z

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

dnolen 2021-06-16T17:06:57.138500Z

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

dnolen 2021-06-16T17:07:19.139100Z

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

Michael Jung 2021-06-16T17:51:36.142800Z

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?

Michael Jung 2021-06-16T17:59:40.144300Z

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 Jung 2021-06-16T18:24:10.145300Z

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

dnolen 2021-06-16T18:40:36.145800Z

oh right

dnolen 2021-06-16T18:40:59.146400Z

FWIW I don't believe in JS routers

1
dnolen 2021-06-16T18:41:07.146800Z

we just use core.match and move on

Michael Jung 2021-06-16T18:52:38.148Z

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.

dnolen 2021-06-16T19:47:32.148500Z

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

dnolen 2021-06-16T19:47:46.148800Z

I don't know how react navigation works

dnolen 2021-06-16T19:47:57.149100Z

I suspect whatever you are seeing you will see elsewhere

dnolen 2021-06-16T19:49:22.150100Z

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

Michael Jung 2021-06-16T20:11:46.153100Z

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?