This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-07
Channels
- # announcements (4)
- # babashka (20)
- # beginners (167)
- # calva (1)
- # cider (18)
- # circleci (10)
- # clara (45)
- # clojure (85)
- # clojure-argentina (1)
- # clojure-europe (3)
- # clojure-finland (3)
- # clojure-greece (2)
- # clojure-italy (9)
- # clojure-nl (30)
- # clojure-spec (32)
- # clojure-survey (39)
- # clojure-uk (72)
- # clojurescript (12)
- # core-async (4)
- # data-science (3)
- # emacs (10)
- # figwheel-main (9)
- # fulcro (44)
- # graalvm (3)
- # jobs (12)
- # jobs-discuss (6)
- # joker (3)
- # juxt (1)
- # leiningen (4)
- # off-topic (23)
- # planck (5)
- # re-frame (4)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (43)
- # spacemacs (8)
- # test-check (19)
- # tools-deps (21)
Yeah I'm using it. Running into any particular issue @steedman87?
Was running into some issues / confusion around how to structure the app. This example project is really helpful, thanks @thheller!
I’m trying to use this library: https://github.com/JulianBirch/cljs-ajax
Which has this bit of code: https://github.com/JulianBirch/cljs-ajax/blob/master/src/ajax/xml_http_request.cljs#L29-L34
The conditional at the top should be false (because cljs.core/*target*
returns “react-native”
but I’m still getting an error when running my code: Unable to resolve module xmlhttprequest from …
I’m pretty sure that snippet of code is the culprit because I copy and pasted it into my code without including the lib and got the same error
React native comes with xmlhttprequest, so the else branch should be able to run find (https://facebook.github.io/react-native/docs/network.html)
therefore the compiler (metro) will try to resolve it and fail at compile time. it never gets to runtime.
there might be some way to tell metro to ignore it but I don't know. check with someone that actually uses react-native 😛
Maybe using this: https://facebook.github.io/metro/docs/en/configuration#extranodemodules
strange, for me js/XMLHttpRequest returns the right thing
and that snippet of code takes the correct branch
which version of react native are you on?
this is about react-native metro trying to include the (js/require "xmlhttprequest")
since its done at compile time and it doesn't recognize the conditional
ah of course
Creating a shim and declaring it in extraNodeModules
in metro.config.js
seems to have done the trick.
Do users of Shadow-CLJS also integerate with FigWheel?
or do we see it as one vs the other?
well, fig has the cool dom updater. But, maybe Shadow does that as well?
Okay, good to know
when would one choose to use one over the other?
and provides a killer feature in that @thheller does all the work to let you use npm deps as easily as possible in cljs
Okay, cool - I dont have a web or clojure background but, coming up to speed fast and, we are eval/re-eval’ing our dev/test/debug/profiling stack. We currently use FigWheel and, maybe we will have to look into making the move over to Shadow.
if you have been wanting to be able to use proper npm deps rather than cljsjs versions its highly recommended. Also, Bruce just isn't working on figwheel any longer whereas @thheller is incredibly responsive and forward thinking.