This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-16
Channels
- # beginners (176)
- # boot (11)
- # cider (12)
- # cljs-dev (65)
- # cljsrn (54)
- # clojars (18)
- # clojure (195)
- # clojure-austin (1)
- # clojure-dev (2)
- # clojure-italy (8)
- # clojure-quebec (1)
- # clojure-russia (51)
- # clojure-serbia (3)
- # clojure-spec (24)
- # clojure-uk (28)
- # clojurescript (41)
- # cursive (14)
- # data-science (60)
- # datascript (2)
- # datomic (111)
- # emacs (6)
- # figwheel (1)
- # graphql (16)
- # hoplon (26)
- # juxt (2)
- # lein-figwheel (3)
- # lumo (12)
- # off-topic (8)
- # om (14)
- # pedestal (22)
- # perun (2)
- # proton (1)
- # re-frame (29)
- # reagent (27)
- # ring (17)
- # ring-swagger (2)
- # rum (3)
- # spacemacs (3)
- # unrepl (155)
- # untangled (28)
- # vim (4)
@gphilipp: The base ones? No. I have an example using the re-frame ones. I finally got around to packaging up my library with an example. Itβs still rough, but I hope this helps. https://github.com/seantempesta/cljs-react-navigation
@carocad that's correct π
@pesterhazy but if it is like that then having the whole re-natal
+ figwheel
would definitely be an overkill, wouldnt it? I mean I still need to see how does it all play in a real device but if react-native is able hot-reload the code without any funny business (like re-natal does) then this approach would be much more simple π
the challengers are 1. fast turnaround and 2. keeping state in the app (e.g. respect defonce, rerender root)
so far the first build takes significantly longer than with figwheel (I guess because cljs rebuild the whole file from scratch), but afterwards every save/compile command is usually compiled in less than a second. I still need to test the defonce behavior but I guess it shouldnt be affected since that is not a repl feature but a cljs one.
really curious what you'll find!
please report back
@pesterhazy do you know why the repl + cljs auto build is usually not offered together? I dont understand if that is so simple to get from the cljs compiler, why are those two feature usually not found together (like in cljsbuild, lein noderepl, etc) beside figwheel.
not sure what you mean by together
figwheel does a ton of things in addition to just calling that function
however I agree there should be more awareness that getting a repl is actually pretty easy
hey folks, I'm testing a new tool I made with react-native
but an app generated with create-react-native-app
gets extremely slow when generating the JS
@seantempesta your repo is the perfect answer to my question, thx
@gphilipp: Rad. Glad I could help. :)
@thheller how slow are we talking?
the packager is pretty slow. The first transpile step can take >60s. But not more than 2 minutes normally
I think I figured it out, it runs the generated code through a whole bunch of babel transforms
yeah I've experimented with disabling the babel transforms
never quite successful
you can set up a .babelrc
or something, but I haven't figured it out
the problem is transpiling the entire Google Closure library
it's a huge chunk
if you run the RN packager in production mode, it easily chokes on the it unless you manually give it more RAM to use
give re-natal a try, it's reasonably fast
you can also precompile parts of the app with some trickery
then subsequent compiles are quick
maybe it's just because it's the second compile
try find "$TMPDIR" -depth 1 -name 'react-*' -delete
to clear the cache
make sure you actually have a TMPDIR
stay safe π
don't know
> Babel will look for a .babelrc in the current directory of the file being transpiled. If one does not exist, it will travel up the directory tree until it finds either a .babelrc, or a package.json with a "babel": {} hash within.
in my experience the RN packager is pretty unreliable and largely undocumented
it's become slightly better recently
@pesterhazy println
works great, thanks π
@pesterhazy just created react-native demo with shadow-cljs
and haul
. works flawlessly without the insane startup time.