Is there any sane way of using RN without locking into the Expo ecosystem? Last I checked it was a nightmare dealing with native dependencies otherwise.
Config plugins have made this way easier - you’re now able to hook into the native code generation process to add native modules that aren’t already packaged for expo.
I love that you asked this question. As someone who has created a few react native applications in the past, non expo environments has felt as an afterthought. I hope the react native team will improve the documentation and encourage the native platform as well as the expo platform. Some of us don't want to be locked into yet another SaaS with questionable payment tiers - when building your own modules and publishing is:
- Easier in the long run
- You're able to ship a far more featureful application if you deal with media and/or VoIP
- Passing apples reviews seem to be faster if you ship the modules yourself in my experience
When you're using expo you cannot bundle your own native extensions. At my previous job we used pjsip. This extension uses JNI and native calls in iOS via objective-c. You can't bundle native extensions when using expo. You're locked to their prebuilt ones.
To use your own extensions you have to eject/or start a new application with their own native libraries. For most of what expo does you can use the unimodules libraries, they're quite good in my experience.
> When you're using expo you cannot bundle your own native extensions. [...] You're locked to their prebuilt ones.
Unless I'm misunderstanding what you're saying, this isn't true at all. At $day_job we have an Expo app with a custom native library and it works just fine; you just have to write an Expo-specific adapter for it and can't use Expo Go in that case.
React Native added auto-linking years ago, which solved the native dependency problems. Just `yarn add` whatever you need, and if it has native code, the the Android side will incorporate it on the next build. On the iOS side, you do have to run `pod install` to lock in the changes, but everything after that is automatic.
Use Expo because you like the extra features it ships with, but not because you have problems with native dependencies. The React Native built-in experience is pretty much perfect to start with.
Last time I played around with React Native was probably around when it first launched, there was no Expo then, and I haven't used React Native since so I don't even know what Expo is.
But another commentator wrote "yet another SaaS with questionable payment tiers" about Expo (https://news.ycombinator.com/item?id=41937886) which makes me already not want to use it if I ever touch React Native again. Not sure why a SaaS would be involved at all in this process.
You don't have to use Expo's SaaS to use Expo. Expo framework is 100% FOSS. However Expo Application Services is a really great SaaS product for doing things like cloud builds and Over-The-Air updates.
The anti expo sentiment is almost all based on the old days where you had to eject to use native dependencies. Expo is amazing now.