Fork me on GitHub
#cljsrn
<
2020-01-24
>
vikeri07:01:50

@ericihli We just have three cljs builds that accomplish the same thing more or less. We have env/dev/env/config.cljs , env/prod/env/config.cljs etc. and then we just change the src config in the cljs build option to include the relevant dir.

vikeri07:01:57

No external libs needed.

Wes Hall11:01:50

Hey folks, with sincere apologies, as this is probably a question that gets asked hundreds of times, but I have been playing with some app development stuff and currently doing that thing of alternating between ideas of using the native languages, doing some react native in JS, or going for the full abstract and trying to put things together with RN and CLJS. Clojure is my language of choice these days, but I also worry about too many levels of abstraction and the state of the tooling. Are there any particularly shining examples of good RN+CLJS projects that anybody can link me to, so I can have a bit of a browse as to how all this stuff looks when crafted by somebody who knows what they are doing? 🙂

vikeri11:01:44

In general I’d say that it’s an exceptionally productive and powerful setup for developing mobile apps. The tooling can at times be quite difficult to get right though.

Wes Hall11:01:53

Thank you @vikeri. Will have a look through that project. Looks like lots going on in there. Judging by the channel title, I assume re-natal is still the goto for most people doing this stuff? I have been hearing some good things about expo, but this whole world is pretty new to me. Done a lot of server side and web stuff, but haven't really taken the leap into native mobile in a serious way.

vikeri11:01:51

Actually I think shadow-cljs is the preferred setup nowadays. And if you don’t need specific native features I’d definitely go with expo.

☝️ 12
Wes Hall11:01:55

Great info. Thank you.

danielneal11:01:15

@wesley.hall if you haven’t come across it, you might find my talk useful, there’s a link to a demo app in it, but the demo app is a bit experimental 🙂

👍 4
danielneal11:01:43

our prod app isn’t open source I’m afraid though

Michaël Salihi13:01:53

@wesley.hall You can check this repo, if you want try "Shadow-CLJS + Expo + Re-frame" instead Re-natal https://github.com/PEZ/rn-rf-shadow

👍 12
4
jgood21:01:56

I did something very similar but with a few more dependencies. 😉 https://github.com/jgoodhcg/shadow-cljs-expo-starter

👍 4
Wes Hall14:01:30

Thanks folks. Just going to be in a bit of a meeting fest for the rest of the day but will look at both tonight :)

dotemacs15:01:00

Another repo you might want to consider, is this one (not a lot in the README, but plenty of detailed explanations in the comments on how to structure the app and how to use react-navigation) https://github.com/eihli/cljs-react-native-starter /cc @wesley.hall

👍 4
anson15:01:26

Hi everyone 🙂 I want to share a library that I just published that helps you write modern React components with CLJS (yet another!). I started on a CLJS/RN project recently and felt that the various frameworks libraries out there didn’t try hard enough to get out of my way - surely it’s a matter of preference, but I really just wanted to define components using defn instead of some DSL or helper. I left state management out of scope, and I think ended up with a nice API that achieves the goal with strong extensibility. Broadcasting here because I’m happy with it and hope someone out there finds it useful 😁 Feedback welcome! Link below https://github.com/anrosent/rct

4
vikeri16:01:30

Interesting! I’m personally very happy with reagent and re-frame. Did you try those and if you did what did you find the issues to be?

anson17:01:39

Thanks. I started the RN project with reagent/re-frame from the stencil, but my thinking was: 1. Saw hooks/async render/scheduler improvements in recent/upcoming React core dev 2. ^ Gives leverage to a small library focused on mapping to native components 3. Skeptical of the leverage of reagent’s reactivity/rendering solutions in light of ^^. Wondered if reagent’s solutions wouldn’t track these improvements due to all the custom mechanics. 4. I vaguely recall being petty about the way I had to use r/adapt-class and interop with native components, whether using native components in reagent components or vice-versa with react-navigation. I forget if this pettiness was justified, but wanted to be closer to native components to minimize problems. 5. Was focused on ergonomics of my current problems, probably neglecting most of the reasons that the other frameworks are so built out. So I started writing the library. Of course I then had to implement a state-management library, which made it less of a win since I recall re-frame looking really nice but coupled with reagent… In any case, that’s more or less the origin story :)

👍 4
vikeri15:01:43

Interesting. re-frame is pretty killer. Would be very interesting if you could switch out reagent for your implementation.