Fork me on GitHub
#cljsrn
<
2020-04-14
>
dnolen19:04:55

Krell now has simple hot-loader - will definitely need some further work but it's passable - working on the React side of things now and then will create a Reagent tutorial, hopefully done sometime tomorrow or Thursday

šŸš€ 24
dotemacs19:04:43

Any chance that you can just share your build.edn from a sample project?

dnolen19:04:56

yeah but there's nothing in there šŸ˜›

dnolen19:04:14

{:main hello-world.core
 :output-to "target/main.js"
 :output-dir "target"}

šŸ™‚ 4
dnolen19:04:20

it's really that simple ^

dnolen19:04:26

you don't have to specify anything at all

dnolen19:04:33

easier than web stuff

dnolen19:04:52

other benefit of having a tool that does exactly one thing

dotemacs19:04:04

OK, I was doing that and getting the REPL, but then it just wouldnā€™t evalā€¦ so figured that I might be missing something in build.ednā€¦

dotemacs19:04:36

Iā€™ll wait for the tutorial šŸ™‚ Thank you for the work on this, itā€™s pretty cool!

dnolen19:04:06

it does use mDNS a la Ambly so that could be source of issues - happy to consider alternative ways to the connect the device (in addition to mDNS)

dnolen19:04:21

but mDNS when it works is nice since you can be untethered in all cases

āž• 4
dnolen19:04:31

(after the app installed)

dotemacs19:04:20

I hope that this work youā€™re doing re-charges the enthusiasm for react-native amongst ClojureScript-erati, ā€™cos I know I am šŸ™‚

dnolen19:04:37

I definitely think it can't hurt - though my impression if you're into shadow then shadow solves these problems well too?

dnolen19:04:27

Krell is a bit more Clojure-y perhaps - we don't use shadow so we built this instead

dotemacs19:04:18

shadow-cljs just works and itā€™s pretty cool. But now that this is getting rolled out, I hope that more people take notice as it might have more of an ā€œofficialā€ blessingā€¦

dnolen19:04:45

well it's not really "official"

dnolen19:04:52

it's a Vouch OSS not a Clojure one

dnolen19:04:51

to be honest maybe people don't know what shadow handle RN too? I honestly didn't know what w/o reading through ClojureVerse recently

dnolen19:04:18

Also shadow doesn't have many links on the website

dnolen19:04:25

happy to see that rectified through PR to the right pages

dotemacs19:04:21

Iā€™ve got to admit that Iā€™ve ā€œsleptā€ on shadow for so long, but then once I picked it up, I kept thinking ā€œwhy didnā€™t I pick this up sooner?ā€

ā˜ļø 4
dotemacs19:04:47

But I donā€™t think that this ā€œvisibilityā€ problem with regards to shadow-cljs & react-native, is a shadow-cljs specific problem. There is so much info about how to do certain things with react-native, but itā€™s all spread out across different projects. Iā€™m talking about how to do different things, like sample usages with different packages, rather than setting up the tooling.

šŸ‘ 8
jgood04:04:38

I have a create kit with some examples of state management, navigation, and a material design component library. https://www.npmjs.com/package/create-expo-cljs-app

dotemacs19:04:43

This video is a great example of how to use it with shadow-cljs: https://www.youtube.com/watch?v=BZR4N5cY64U

dotemacs19:04:15

It does talk about how to use expo, but if you just use ā€œnativeā€ react-native, expo-less, all of the tips still apply.

raspasov22:04:05

@dnolen Great to see this https://github.com/vouch-opensource/krell I can confirm the RN tooling is still lacking; Been getting back into RN+CLJS dev in the last few days; Most recently I've followed the approach outlined here https://github.com/bhauman/react-native-figwheel-bridge which works quite well; Where I still ran into problems is with advanced builds; 1.5 years later this still is a problem https://github.com/facebook/metro/issues/291 RN's Metro seems to mess with the Google Closure advanced output and without this hack you can't compile for production; on the bright side, the hack still works;

raspasov22:04:29

maybe I'm missing something obvious about a way to instruct RN Metro to just ignore the Closure output code but I can't seem to find the magic config in their docs

dnolen23:04:14

@raspasov yeah we still have that problem too - not sure what we can do there other than request some kind of flag to turn off that optimization off

šŸ‘ 4
dnolen23:04:16

re: that figwheel bridge stuff - yep, the new bundle target in ClojureScript was actually arrived after running into all those issues and finding asnwers for them - I examined re-natal pretty closely

dnolen23:04:12

but then I realized the approach I came up with for Krell works for any JS bundler that handles Node.js require

dnolen23:04:30

also there's an even older constant folding one - https://github.com/facebook/metro/issues/208

dnolen23:04:45

also not fixed

raspasov23:04:00

Yes multiple issues, Iā€™m guessing not a huge priority for them; I do remember at some point I was able to ignore it from a .babelrc file but I donā€™t think it works with the latest RN; all those tools and configs (babel, whatnot) also change the format of their configs every 6 months it seems which doesnā€™t help me keeping up with them šŸ™‚