Fork me on GitHub

@xfyre Have you worked with reagent before? This guide could give you more insight:


Also, has anyone thought about if inline requires would help us out with ClojureScript apps?


shadow-cljs in theory supports this. I just haven't found someone yet to actually use it in practice 😉


Ok nice! Supports this as in does supports the RN solution or does it by itself?


it lets you split your code into multiple "chunks/modules" that can be loaded "lazily" via js/require


Ok nice, I’d have to define the different modules manually then? It seems the metro feature does this automatically


yes, code splitting is static in CLJS. you define the boundaries


Check, so would I still need that feature in RN or is this standalone?


RN deals with the loading so you need both


Ok I see. I define the modules and RN detects when they are used and handles the lazy loading?


no clue about the second part. I haven't tested that yet. shadow-cljs just creates multiple .js files instead of one. How you load them is then up to you/RN. So if you load it in some componentWillMount or whatever lifecycle event it could be lazy


Nice, yeah we’re still on re-natal. But interesting to know that this would be a good way to improve performance.


@vikeri Of course. I managed to create HOC easy enough, but I’m still facing some weird issues I can’t properly explain.


@xfyre Okok! Yeah if you have a specific issue it might be easier to debug

Oliver George11:09:57

I'd like to include a datascript database in my app to save loading data from the network. I see that (js/require "./blah/data.json") works but it returns JS objects/arrays which kind of gets in the way of using transit format and desearializing.

Oliver George11:09:06

How do you bootstrap your app db?


at the moment, we bundle data as json files, but save data to async storage in strings made with transit


We do the same, serialize with transit and store to AsyncStorage


How are you testing cljs react-native apps? I'm trying to understand the options and tradeoffs.


@mynomoto We only test business logic (never have any UI bugs thanks to re-frame + spec). We mock out everything RN specific and then we run the tests in nodejs.


@vikeri Thank you! You are probably better than me, I still have ui bugs 😉. That is near our current setup but I wonder if there is a practical way to test react-native components on the native side or at least snapshot testing without going to much on the javascript side of tooling.


we are trying to use appium but oh boy it is hell


@mynomoto Maybe try reagent’s render-to-string?


My experience is that if you put all business logic in the subscriptions and then make sure they adhere to a spec you will catch 99% of the issues. The issue is usually that the subscription doesn’t return what you expect it to return


@vikeri I will take a look, thanks. What worries me most about the ui is having broken state in which something should be rendered but isn't because of a typo. I don't want much from the ui tests but that would be nice to have.


@danieleneal thank for letting me know, I will try to avoid that route while I can.


Sounds good


I think once we’ve got it working and integrated with ci it will start adding value, but it’s a hard slog atm with little payoff


detox is supposedly pretty good


@danieleneal Detox seems really nice, thanks!