I have a little trouble getting the minimal example on https://reactnavigation.org/docs/tab-based-navigation to work with krell. Maybe it's just handling of node_modules and making them accessible to Clojurescript. I'd be wonderful if someone could show me how to do it in the context of krell. I must be missing something obvious...
@axel.schuessler thatโs a bit of a open question, there could be so many details there.
In any case, this is a good example on how to get react-navigation
going. It is set up with shadow-cljs, but once you require the node packages Iโd say that the rest should be pretty much the same with krell. Have a look:
https://github.com/eihli/cljs-react-native-starter/blob/master/src/example/core.cljs
I have a question guys: Why don't we just use react native's modals for navigating smoothly between views? I mean, why can't the application just be a single paged one instead of using stacks and having several views? ๐ฎ
Well isnโt that up your requirements? You can navigate the way you think it makes most sense for you & your potential users.
I see. I just thought maybe the community had figured something out that I didn't know. ๐ฎ
Maybe there was some performance reasons for using these stack based navigations. Good to know that it is all preference ๐
@axel did the tutorial work for you? if so then what specific problem are you having?
@dnolen The tutorial works for me. Perfectly. Thanks for asking. REPL on the simulator (for now only tried iOS) works like a charm for me. I just struggle to get node modules required. And this again might be only me not yet understanding how React Navigation works wrt to @bla and bla imports (with and without the at-char) on the Javascript side and how that translates to Clojurescript requires.
@axel for scoped libraries you have to use strings for the require in the ns form
I mostly use Clojure (not Clojurescript) and wanted to shortcut using RN with JS first and jump directly to Clojurescript instead. And now I'm bothering you with noob questions. Sorry. ๐
note that some libraries export default
there's no special handling for this - so you may need to go through that property
(.. foo -default -apiThing)
Ah, thanks for the hint.
@axel good luck, I think RN while cool / useful - is kinda the deep end
๐ Yes, that's my impression so far. I'm considering native mobile apps for my web app (which is not based on react as one could guess).
about to remove all the Bonjour discovery stuff from Krell - I went down this path to avoid hard coding the IP/port in the client code because I had a good experience with Ambly but my experience w/ this approach on Android so far as been very low
I switched to writing out the ip / port into the REPL code, and this works all the time and quickly in all cases
I did change the code a bit so the REPL publishes an Bonjour service, if the device sees that it will take the updated information and reconnect - but this of course is just extra - the fundamental thing is more reliable
it also means no more adb
command so REPL on Android is better
fewer things to forget
also the order of starting things doesn't matter any more
@dnolen is on fire! ๐ฅ
@admin055 everything should be more reliable for you
I worked w/ Android simulator/device most of the day and the behavior is much improved
My last succed test was on real android device. Emulator was'nt work, so I'll retest later. Thx
@admin055 that would great, both cases could connect in a few seconds now when I tried several times today