3 ms·
The usual idea I hear is that React Native might be a good idea for a small company with an uncomplicated app, especially if they use the React stack on the web
by Ologn 8y ago
The usual idea I hear is that React Native might be a good idea for a small company with an uncomplicated app, especially if they use the React stack on the web.
However when one grows and starts competing head to head in the App Store or Google Play with the other top social or finance or music or whatever apps, the ones who have expert teams with familiarity with the specific Android or iOS platform will pull ahead. Particularly as you can still have a (mostly) common REST API backend, base things off the same design mockups with some modifications, and so on.
- victoriasun 8y agoDiscord is actually an extremely complex app and run almost entirely off React Native, with 2 engineers, only 1 of which who is an iOS expert :P! We have millions of users, and we typically rank in the top 10 of Social Networking on the iOS App Store. We are excited to share our success story of being a "big" company using such a product.
- deleted 8y ago[deleted]
- jrumbut 8y agoI was very surprised to hear discord used RN because I found that I had to break down and use native code to deal with a lot of multimedia and a few other things that aren't just displaying text. I still loved RN, I just maybe naively hoped I could do everything with it. Is that your experience too, that a good bit of native code is required (with RN serving as glue and handling simple screens), or have you avoided that somehow?
- victoriasun 8y agoPersonally I have found that RN does require some amount of native platform knowledge to be successful. However, the bulk of our app is actually in React Native. The times we've had to bridge into native is mostly around our voice modules or things that, in RN, were not very performant (like poor list performance) or required synchronous updates (like the keyboard problem mentioned in the post). Certain multimedia objects RN doesn't support out of the box but the community has come to the rescue (ie: https://github.com/cornedor/react-native-video-player https://github.com/cornedor/react-native-video-player for video).
- QualityReboot 8y agoI agree with all of this, but I'd add that bridging RN to Native is not as scary as it sounds. Check out the code examples: https://facebook.github.io/react-native/docs/native-modules-ios https://facebook.github.io/react-native/docs/native-modules-... In practice, most of it is wrapping "RCT_EXPORT_METHOD" around native code and importing it into JS. Even if you had to write half the app in native code (which you won't), you're still far ahead of having to write it all in native code on both platforms.
- laex 8y agoAgreed. Creating bridging modules aren't that complicated. For anyone interested, I've linked a sample of a bridging module from my open-source project, for both IOS and Android. See [0] & [1] The bridge creates an interface between an embedded webserver to react native. Things to note: 1. Always dispatch bridging methods to their own threads. On IOS you can do this via. dispatch_async. On Android, you can utilise native threads or some kind of task management library. I like Bolts [2]. 2. Always create bridging methods that resolve promises. This makes it easy to utilise async / await paradigm on the JS side. [0] Android: https://github.com/hemantasapkota/react-native-web-server/tree/master/android/app/src/main/java/com/reactnativewebserver/AppWebServer https://github.com/hemantasapkota/react-native-web-server/tr... [1] IOS: https://github.com/hemantasapkota/react-native-web-server/tree/master/ios/ReactNativeWebServer/AppWebServer https://github.com/hemantasapkota/react-native-web-server/tr... [2] Bolts: https://github.com/BoltsFramework/Bolts-Android https://github.com/BoltsFramework/Bolts-Android