Fork me on GitHub
#cljsrn
<
2020-07-13
>
bitpadawan18:07:37

hey, i am a complete beginner with react native, been learning clojure/script and loving 'em. would love to give creating awesome mobile apps with cljs a try, but the best course and the best choices are eluding me. first things first, should I focus on learning RN first? I have no previous JS experience .. and the other big question is, which lib to use in cljs? re-natal seems a bit outdated but the cljsrn site still seems to recommend it.

dotemacs18:07:56

Krell or shadow-cljs are modern alternatives

bitpadawan18:07:19

shadow-cljs as in using js interop ?

Daniel Schlaug18:07:19

@bitpadawan if you’re going to start react native in clojurescript as a novice you need to be aware of what you’re getting into. You have 4-5 layers at which things can and will go wrong. Compared to 1 layer in most other environments. Your system basically looks like cljs -> js -> react native -> (swift / kotlin) -> objc / java. Things go wrong at all these steps and it’s a wonder it works as well as it does. It is the most enjoyable way to write apps when it works but I would recommend you get some experience in all of the 5 technologies individually before you take it all on at once.

💯 3
bitpadawan22:07:52

@daniel975 well, i'm pretty convinced that cljs is the way to go, that or nothing .. it's just a lot more fun to do it with cljs. and i don't know js and would prefer to skip over the entire thing as much as possible. but I take it from your reply that things are just not at that level yet?

bitpadawan22:07:09

like, i didn't know react either, but picking up reagent/re-frame was doable

bitpadawan22:07:58

this rn stuff does seem more complicated, and if there's excellent cljs documentation for cljs+rn beginners, I must've missed it.. any resources you could suggest?

Daniel Schlaug22:07:43

I think @U064J0EFR’s docs for figwheel main (https://figwheel.org/docs/react-native.html) looks awesome but I haven’t actually used them yet so can’t vouch for the overall experience.

bitpadawan22:07:44

i'm determined enough to pick up js along the way if that's what it takes, but if there's a way to stay closer to cljs that would be perfect

Daniel Schlaug22:07:31

If you’re really devoted this might be possible but be prepared to run into problems where you need to dig deep into what’s going on in the cljs build system, javascript code and the build systems of Android and iOS. It’s currently not as smooth a ride as it is to use cljs for the web. Hopefully we can get there in the future!

bitpadawan09:07:08

I'm beginning to read "React Native In Action" now to at least situate myself regarding RN. the part that is the least clear is how to do it on the cljs side once i start getting the concepts -- re-natal seems to be prettier than using interop all the time, but it only supports older RN versions. I've read good things about krell but have not dug deep yet. the only other option is pure interop right? do you have any suggestions about how to go about this specifically (choice of lib and/or interop)

bitpadawan09:07:59

also, for context, i'm technical enough (sysadmin background) that I could pick up js ecosystem stuff along the way, it's just that frankly I have very little interest in doing so, and a lot of things i am / want to learn. i'm pretty sure that i would never actually use JS for much of anything (cljs is beautiful and enjoyable, personally I can't say the same about JS)

bitpadawan09:07:58

... but if it turns out that it's absolutely necessary or at least a very good idea to do so, then it would be a necessary evil. I am indeed quite devoted to become able to create cljs mobile apps (and web stuff, but that I am also working on and there is good enough documentation already and it's been tough but doable to progress)