Fork me on GitHub

why sometimes I can use :refer to require a macro?


is the :refer-macros always necessary?

Michaël Salihi12:07:04

Hi @thheller, hi guys ! When using Shadow-cljs with React-native / Expo, is it possible to reconnect the websocket / repl after manually to reload the application? Typically, Shadow-Cljs supports hot reloading so that the hot / live reload of the emulator is disabled, but sometimes, when the required namespaces are 3 sublevels components (search.cljs -> :require flat-list-movies.cljs -> :require movie-item.cljs), no changes are displayed until the root namespace (search.cljs) is modified for eg.. Thx in advance for the support ! 🙂

Michaël Salihi12:07:27

PS For the same project with Re-natal (figwheel), I can reload app without loosing Repl connection and the 3-sublevels required files hot-reload works.


@admin055 do you have any special figwheel annotations in search.cljs? eg. (ns ^:figwheel-always ..)?


you are doing something weird if your changes only apply if the root namespace is reloaded since that shouldn't be necessary

Michaël Salihi15:07:18

@thheller I just retry with a new fresh clone of your reagent-expo repo and I can reproduce the behavior. If I recursively require namespace like : -> :require and :require modifications is hot reloaded on and files but not on The shadow-cljs watch app return 2 files compiled while we have 3 files. [:app] Build completed. (100 files, 2 compiled, 0 warnings, 0,05s)

Michaël Salihi16:07:00

@thheller I put here my fork with which you can reproduce the behavior :


I'm not sure what the problem is?


everything looks ok to me?


hmm I don't actually know. shadow-cljs is reloading the code as it should. I suspect that reagent is just skipping the re-render


I can "fix" it by just calling (expo/render-root (r/as-element [root {:x (js/Date.)}])) instead of (expo/render-root (r/as-element [root]))


I'm actually not all that familiar with reagent so I don't know why it skips rendering


must be some internal caching I'm missing

Michaël Salihi19:07:20

Nice, thank you very much for all these informations @thheller! I think I will open an isssue on Reagent repository

Michaël Salihi19:07:17

@thheller I'm thinking about it, when using Reagent and Shadow-cljs normal project (not React-native), we don't have this behavior...the hot-reload works well in the same case. Do you know why ? Maybe it's at the :target :react-native level ?

Michaël Salihi19:07:54

Thank you for all these answers to a newbie that I am 🙂


I'm not sure why this is happening either

Michaël Salihi13:07:57

@thheller No, for the Shadow-cljs version project, I don't have anything who concerns figwheel configuration. For information, I had clone this repo to begin my project I tried to clone one more time with simplier project which consists to 3 files/namespace and I have the same behavior with the hot-reloading. Same things, with your repo How can I debug ? Any clue ? Thx


in core.cljs goog.Uri is :required, but only to write (instance? goog.Uri ,,,) somewhere. maybe it should be :imported rather than required?


not sure what the right idiom is for that