@zackteo This project is a good starting point imo https://github.com/PEZ/rn-rf-shadow
I had issues with this the other day cause there's issues with the expo app(?) on android
@zackteo krell works out of the box https://github.com/vouch-opensource/krell
without shadowcljs
But it’s alpha software if the author of it is to be believed @danieltanfh95
The odd thing is that on http://cljsrn.org site we still have outdated info about how to start, with projects that are a bit long in the tooth. The next thing is, whichever approach you choose, you still have the fork in the road: - doing it via react-native “native” - or doing it react-native via expo
I wonder if we could run a survey to give insight into which approaches are common / proven effective.
Sounds like a good idea. Maybe we can just throw some questions here and then create a public form that we’d let people to fill in
Sure
The list of questions (Please add them in thread)
* Are you using any native/JS libraries that you've found difficult to interop with from CLJS?
• Are you targetting iOS, Android, or both?
* What stack do you use for your cljsrn
app?
* Did you compose this stack yourself or did you use some template? If you used a template, which one did you use?
* What is your app, if published in App/Play store?
* how complex is the app UX?
* What testing approach do you use? Unit tests, end to end tests? And what libraries/tools do you use for it?
* do you have a one step deployment process? If so, which one? (e.g. fastlane)
* do you design UX in CLJS or JS (e.g. as a own component library)?
* What build tool do you use and why? (e.g. Leiningen, Krell, shadow-cljs, Boot…)
* What do you use react-native Expo or just “plain” react-native? And why did you go down this route?
* what tooling do you use to improve the development experience? (e.g. StorybookJS, re-frame-10x, re-frisk, Chrome debugger console...)
* Would you recommend your approach? What use cases is it good for?
* What UI toolkit did you asses and what UI toolkit did you settle on? What were the pros/cons of each?
* What does CLJS give you that you'd miss doing the app in JS?
Pretty sure step two is we start a podcast and use those as interview questions.
Haha
* Are there any parts of your app that use JavaScript for? Why did you take this approach? And what is your setup to share the code with ClojureScript?
Sounds like a logical next step! 😃
* Have you had to write your own native modules?
* Have you made any hacks to make the cljs compile output compatible with the RN bundler?
At Pitch we started with re-natal and then moved over to shadow (https://github.com/PEZ/rn-rf-shadow was a big inspiration). We took a quick look into Krell but it didn’t solve the main problems we still have (Sourcemaps and hot reloading vs fast refresh). So we’re still on shadow and really happy with it.
We haven’t gotten around sharing much details about our stack yet, but I hope we find time to do so later this year. Here’s are some corner points though: The mobile app is build on a classic stack using react-navigation et al. There’s a lot of code reuse with our web app: API/Sync client, Authentication logic, Domain logic, re-frame utils. Also we do use re-frame in both apps, but use a different DB structure and different handlers/subs because the apps differ quite a bit. In our handlers and subs we try to rely on as much common domain logic as we can.
I’m happy to share more. Please ping me as I’m not hanging out on Clojurians nearly enough. Also something I want to change 😄
* What performance bottlenecks have you hit - either in CLJS or RN?
* What editor/IDE setup do you use for development?
* Did you choose RN in order to be cross-platform, or just to be able to use Clojure?
http://cljsrn.org accepts pull requests, so maybe some updated info could be added there
Someone should definitely add a paragraph up top on Shadow, that seems pretty popular.
I’m not sure that re-natal is the most popular solution anymore, and it’s definitely not the most actively developed.
I added a re-natal PR: https://github.com/cljsrn/cljsrn-org/pull/42
Someone with more shadow-cljs experience than I have should add a quick PR for that
If nobody does it tonight, I’ll do it tomorrow