This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-04
Channels
- # adventofcode (6)
- # announcements (1)
- # aws (18)
- # beginners (104)
- # boot (11)
- # cljsrn (31)
- # clojure (49)
- # clojure-dev (16)
- # clojure-europe (2)
- # clojure-greece (9)
- # clojure-houston (1)
- # clojure-italy (12)
- # clojure-nl (3)
- # clojure-spec (46)
- # clojure-uk (148)
- # clojurescript (12)
- # community-development (13)
- # core-async (7)
- # cursive (35)
- # data-science (13)
- # datomic (70)
- # events (1)
- # fulcro (22)
- # hyperfiddle (1)
- # jobs-discuss (10)
- # kaocha (3)
- # off-topic (7)
- # om (2)
- # other-languages (32)
- # parinfer (1)
- # portkey (4)
- # re-frame (3)
- # reitit (12)
- # shadow-cljs (49)
- # spacemacs (1)
- # specter (6)
- # sql (5)
- # tools-deps (58)
@haiyuan.vinurs I created an example using reagent and react-native, without expo. https://github.com/thheller/reagent-react-native
@thheller thanks so much for your expo template. I've been using expo and react native for a major project for a while. I've never used shadow-cljs before and I tried it this Friday afternoon for the first time. It worked great!
Also I think the source map issue is fixable - the expo template I was using before has something in that patches the metro server: https://github.com/seantempesta/expo-cljs-template/blob/master/resources/leiningen/new/expo/env/dev/user.clj#L22-L27
Re-natal I think does the same thing
https://github.com/drapanjanas/re-natal#enabling-source-maps-when-debugging-in-chrome
To get react native to work in production mode on 0.57 there's also a patch needed to the metro bundler
But thanks again, the npm integration and reloading is 👌 💯, think I'll use shadow-cljs much more in future!!
@thheller I think the file moved in about v0.55 I think I have it working somewhere let me dig it out
(defn enable-source-maps
[]
(println "Source maps enabled.")
(let [path "node_modules/metro/src/Server.js"]
(spit path
(str/replace (slurp path) "/\\.map$/" "/main.map$/"))))
yeah - it's now Server.js
rather than /server/index.js
it's useful when there's an error -> switch on debugging in chrome, pause on exceptions, pause on caught exceptions ->
might only be possible to do this using the bridge method of loading code without going through metro
doesn't seem like a high priority for them https://github.com/facebook/metro/issues/104
it's definitely working for me with that patch in place
in my current expo set up, which I don't think skips metro
haven't tried with shadow-cljs yet
my main project is expo / clojurescript
ah yeah, that uses figwheel-bridge