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
Thanks @dnolen !
Any chance that you can just share your build.edn
from a sample project?
yeah but there's nothing in there š
{:main hello-world.core
:output-to "target/main.js"
:output-dir "target"}
it's really that simple ^
you don't have to specify anything at all
easier than web stuff
other benefit of having a tool that does exactly one thing
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
ā¦
Iāll wait for the tutorial š Thank you for the work on this, itās pretty cool!
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)
but mDNS when it works is nice since you can be untethered in all cases
(after the app installed)
I hope that this work youāre doing re-charges the enthusiasm for react-native amongst ClojureScript-erati, ācos I know I am š
I definitely think it can't hurt - though my impression if you're into shadow then shadow solves these problems well too?
Krell is a bit more Clojure-y perhaps - we don't use shadow so we built this instead
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ā¦
well it's not really "official"
it's a Vouch OSS not a Clojure one
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
Also shadow doesn't have many links on the <http://clojurescript.org>
website
happy to see that rectified through PR to the right pages
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?ā
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.
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
This video is a great example of how to use it with shadow-cljs: https://www.youtube.com/watch?v=BZR4N5cY64U
It does talk about how to use expo, but if you just use ānativeā react-native, expo-less, all of the tips still apply.
@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;
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
@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
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
but then I realized the approach I came up with for Krell works for any JS bundler that handles Node.js require
also there's an even older constant folding one - https://github.com/facebook/metro/issues/208
also not fixed
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 š