Fork me on GitHub
#cljsrn
<
2016-11-23
>
paul-c02:11:13

React-native supports platform specific file extensions as described here https://facebook.github.io/react-native/docs/platform-specific-code.html#platform-specific-extensions. Since clojurescript uses a different module system, I don't see a way to take advantage of this feature. What options do I have for platform specific code? (I'm using re-natal)

tiensonqin06:11:22

@paul-c I actually have this problem too. Exponent promotes single entry for both iOS and Android, While React Native and re-natal, boot-react-native have each entry per platform. My experience is most components works on both platforms, two entries are really needless(especially with platform specific extensions). But for Clojurescript to support platform specific, maybe we need to hack the compiler? Currently I’m working around this like (if (ios?) (ios-component ..) (android-component)).

savelichalex06:11:59

Hm, I'm just have two realizations and then pass it to another components in core files

tiensonqin06:11:54

@savelichalex like yourapp.android.core and yourapp.ios.core? Then it’s two entries. I only have one entry (index.js not index.ios.js and index.android.js).