This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-20
Channels
- # aleph (2)
- # announcements (4)
- # aws (3)
- # beginners (141)
- # calva (9)
- # clj-kondo (1)
- # clojure (3)
- # clojure-boston (2)
- # clojure-brasil (1)
- # clojure-houston (1)
- # clojure-italy (4)
- # clojuredesign-podcast (1)
- # clojurescript (22)
- # cursive (2)
- # data-science (1)
- # emacs (26)
- # fulcro (22)
- # juxt (1)
- # off-topic (28)
- # onyx (3)
- # pedestal (4)
- # reagent (10)
- # reitit (6)
- # shadow-cljs (9)
- # spacemacs (2)
- # tools-deps (29)
- # yada (1)
ohhh, I found this: https://blog.fikesfarm.com/posts/2016-03-01-clojurescript-macro-sugar.html
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 ! 🙂
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 your.search ..)
?
you are doing something weird if your changes only apply if the root namespace is reloaded since that shouldn't be necessary
@thheller I just retry with a new fresh clone of your reagent-expo repo https://github.com/thheller/reagent-expo and I can reproduce the behavior.
If I recursively require namespace like :
and test.foo :require test.bar
modifications is hot reloaded on http://test.app and test.foo files but not on test.bar.
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)
@thheller I put here my fork with which you can reproduce the behavior : https://github.com/PrestanceDesign/reagent-expo
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
Nice, thank you very much for all these informations @thheller! I think I will open an isssue on Reagent repository
@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 ?
https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/devtools/client/react_native.cljs
Thank you for all these answers to a newbie that I am 🙂
@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 https://github.com/PEZ/rn-rf-shadow 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 https://github.com/thheller/reagent-expo How can I debug ? Any clue ? Thx