cljsrn

https://github.com/drapanjanas/re-natal | https://github.com/drapanjanas/re-natal/wiki/FAQ | https://github.com/condense/mercury-app/wiki | https://github.com/seantempesta/expo-cljs-template/ https://www.npmjs.com/package/create-expo-cljs-app
dnolen 2020-05-13T00:59:04.060900Z

device-caching / fast REPL reconnect is in master

👍 4
dnolen 2020-05-13T00:59:46.061800Z

it was a doozy - so there's likely to be issues - that said on a larger project where N things might bork something - it makes the dev process a lot smoother

dnolen 2020-05-13T01:00:20.062500Z

you can just RN refresh to get back to a good state and the REPL just reconnects and you keep going

dnolen 2020-05-13T01:00:29.062800Z

no need to restart the REPL

dnolen 2020-05-13T01:01:01.063400Z

if you change things via compile (no REPL) then the app will let you know when you connect a REPL

dnolen 2020-05-13T01:01:38.064200Z

(this also means you can interact w/ an App after the first install via Krell w/o connecting a REPL at all)

joshmiller 2020-05-13T01:01:54.064300Z

I got Krell/CLJS running on macOS with Microsoft’s RN fork.

👏 1
dnolen 2020-05-13T01:02:00.064600Z

hey nice!

joshmiller 2020-05-13T01:02:33.065500Z

The only big change is react-native-tcp-socket’s Podfile says it supports iOS, but it compiles fine on macOS if you change the Podfile.

joshmiller 2020-05-13T01:02:40.065900Z

REPL, reloading both work.

dnolen 2020-05-13T01:02:41.066Z

the above was all tested mainly with Android - so I didn't cut any corners wrt. to platforms

dnolen 2020-05-13T01:02:58.066300Z

@joshmiller right that makes sense to me - super cool

joshmiller 2020-05-13T01:03:23.066700Z

Yeah, benefits of small lib that lets RN do most of the work.

joshmiller 2020-05-13T01:24:15.067900Z

I submitted a PR to add macOS support. Assuming they don’t balk at supporting it, then Krell will be able to run without changes.

👍 1
dnolen 2020-05-13T12:46:25.069Z

nice already merged 🙂

joshmiller 2020-05-13T13:13:53.070300Z

And released. @dnolen if you bump the dep for that to 3.6.0 we should be good to go.

👏 1
dnolen 2020-05-13T13:41:47.070600Z

@joshmiller bumped the dep

👍 1
joshmiller 2020-05-13T13:42:31.071300Z

Awesome, I’ll write up instructions later today then.

👍 1
dnolen 2020-05-13T14:11:05.072300Z

huh realizing that with RN Refresh / REPL Reconnect support in Krell, we no longer need to quit the REPL session for changes to assets or arbitrary requires

dotemacs 2020-05-13T14:13:14.072600Z

Wow, that’s pretty cool

dotemacs 2020-05-13T14:14:21.073800Z

So we can now just npm install smthn..., require it in the ns declaration and we’d be able to just keep going uninterrupted?

dotemacs 2020-05-13T14:50:06.075200Z

Thanks @joshmiller 🙂

👍 1
dnolen 2020-05-13T14:52:36.075800Z

@dotemacs you would need to refresh RN but you wouldn't need to restart the REPL

dotemacs 2020-05-13T14:52:58.076500Z

Thanks for the clarification, that’s great to hear!

dnolen 2020-05-13T14:53:08.076800Z

I can easily add a screen like for the cache invalidation, "Asset change detected. Refresh the application"

dotemacs 2020-05-13T14:54:01.077100Z

Or maybe just refresh automatically

dnolen 2020-05-13T15:00:49.078400Z

I didn't think there was really a supported way to refresh the entire React Native app automatically

dnolen 2020-05-13T15:01:33.079Z

though actually you would get a automatic refresh anyway so never mind 🙂

dnolen 2020-05-13T15:01:42.079300Z

the asset support stuff is required by index.js

dnolen 2020-05-13T15:05:31.079800Z

removed some broken stuff from the network handling, seems better especially on Android

dnolen 2020-05-13T15:06:14.080Z

yep

dnolen 2020-05-13T15:06:25.080300Z

much better now regardless of REPL / app launch order

dnolen 2020-05-13T15:06:44.080700Z

also tweak it so that we don't generate the support files if nothing changed

dnolen 2020-05-13T15:07:08.081300Z

should make the experience of running the app first - then launching REPL via -c -r more sensible

dnolen 2020-05-13T15:07:18.081600Z

you'll only see one refresh

joshmiller 2020-05-13T15:13:17.082100Z

Awesome, thanks, that was a pain point especially when trying to diagnose broken dependencies.

dnolen 2020-05-13T16:14:03.082300Z

yeah

dnolen 2020-05-13T16:14:19.082700Z

painful, all the weird edge cases should be gone w/ the removal of ack stuff

dnolen 2020-05-13T16:15:43.083200Z

I dropped all zeroconf stuff, https://github.com/vouch-opensource/krell

dnolen 2020-05-13T16:15:54.083700Z

so now there are no Android permissions to set - just the cache size

gammarray 2020-05-13T17:49:05.085600Z

Hi 👋 I'm new here. Looking at options for react native development with cljs. Seems like there are a lot of different tools to choose from. I'm curious if folks have any particular one you might point to for a newcomer to pick up?

dotemacs 2020-05-13T17:55:26.089700Z

The gist is this: - re-natal, the oldest option, but now a bit dated - shadow-cljs, stable & works, the maintainer is very prompt to provide support on #shadow-cljs if needed, but only as far as it’s shadow-cljs specific. He doesn’t use it himself for react-native as he doesn’t do much react-native development. - krell the newest arrival, looks super promising but it’s still alpha. Don’t let that put you off as its actively developed.

dnolen 2020-05-13T17:55:37.089900Z

re-natal and shadow-cljs are the most mature for sure

dnolen 2020-05-13T17:56:12.090600Z

re-natal does force you stay on RN 0.59.7 which is not ideal - since 0.6.X has autolinking which is a big simplification

dnolen 2020-05-13T17:56:45.090800Z

pretty sure shadow-cljs doesn't have that problem

dnolen 2020-05-13T17:57:06.091600Z

I work on krell - it's getting there especially now - but there some ways to go still

dotemacs 2020-05-13T17:57:13.091800Z

No, with shadow-cljs you’re not forced on react-native version

gammarray 2020-05-13T17:57:39.092500Z

... the work on this project might not start for another 6 mos

thheller 2020-05-13T17:57:42.092700Z

FWIW I just tested react-native-windows and it just works too 😉

👍 2
gammarray 2020-05-13T17:58:05.093100Z

krell does sound promising for the reasons mentioned on the repo readme

gammarray 2020-05-13T17:59:04.094200Z

i gave re-natal a try a little while back for a sideproject, but got turned off by the need for to run xcode. not sure if that's still an issue, but my team mostly runs linux

dotemacs 2020-05-13T17:59:31.094600Z

None of the solutions above will abstract the need for Xcode.

dotemacs 2020-05-13T18:00:41.095200Z

If you touch iOS, you’ll need to use Xcode for signing at least.

dotemacs 2020-05-13T18:01:05.095800Z

If you’re going to add some extensions, that are native, you might want to do something in Xcode.

dotemacs 2020-05-13T18:01:50.096900Z

Having said that, you can probably get very far and maybe even not touch any Swift or ObjC. But to release the app for iOS you’ll need Xcode.

gammarray 2020-05-13T18:03:21.097800Z

that's ok, we can run xcode, but would prefer to develop in linux. sounds like that is possible?

dotemacs 2020-05-13T18:04:00.098Z

Yes, see this: https://www.blog.nodrama.io/react-native-xcode-linux/

👍 1
gammarray 2020-05-13T18:04:55.098400Z

oh excellent! thx

gammarray 2020-05-13T18:05:13.098800Z

glad to know its possible now

Oliver George 2020-05-13T23:36:29.100200Z

Can anyone comment on using the Metro bundler to serve up static js assets without transformation.

Oliver George 2020-05-13T23:37:13.101Z

I'm speculating in this suggestion, it makes sense only of Metro is happy to not apply transformations to JS files. I think that's how it works but have never done it in anger.

Oliver George 2020-05-13T23:37:13.101200Z

https://github.com/vouch-opensource/krell/issues/88