5 ms·
The general feeling on HN is that it is better to focus on Native development on both platforms because Cordova hybrid apps have a overall bad user experience.
by icpmacdo 11y ago
The general feeling on HN is that it is better to focus on Native development on both platforms because Cordova hybrid apps have a overall bad user experience. Is this still the case with React Native or is it becoming the most effective option?
- clessg 11y agoReact Native apps compile into native apps. That is, no Cordova.
- azinman2 11y agoMy understanding is not that. They don't "compile into" anything. They're run as JavaScript on the phone. The difference is react native calls into native components -- it isn't a universal write once run anywhere. You'll have to craft different JavaScript for android versus iOS. Hopefully most of your code is business logic or other things than UI components.
- clessg 11y agoWell yes, the JavaScript is not converted into Objective C, it is bundled into the app bundle that you submit to the App Store. I guess it depends on whether you consider the ultimate bundling of the application to be compiling. Anyway, the point is that it doesn't run in a WebView. The JavaScript is executed by JavaScriptCore.
- jbob2000 11y agoThe issue is the developer. React-Native as a tool allows you to make poor design decisions, but it does nothing wrong itself. We need to be vigilant and remember to stick to native interactions.
- findjashua 11y agocould you elaborate on what poor decisions rn allows you to make over native ios/android?
- jbob2000 11y agoWith Native ios/android, you get a selection of UI components to use. If your designs don't fit any of those components, you either have to build something from scratch or alter to the design to fit the Native UI language. Usually the prospect of 'building from scratch' is enough to deter people from building components that don't fit the device's interface. So you generally end up with apps that all fit the native design language. With React-Native, it's really easy to be lazy. If you want to be on Android, but you don't want to change your designs to fit Android's UI standards, screw it, just write a wrapper around some of the iOS components and call it a day.
- findjashua 11y agoso rn makes it easy to create components that may not fit in the platform's UI standards?
- clw8 11y agoYes. But it also makes it easy to create components that do fit the platform, thus "the issue is the developer."
- Kwastie 11y agoAn app built with React Native is indistinguishable from a "real" native app, unlike cordova apps it doesn't run in the browser (or in a webview).
- mbrock 11y agoThat's not categorically true. For example, I believe that both the navigator components for React Native in iOS currently suffer from either bugs or performance issues. The more native one has an open issue related to UI flicker, and the JavaScript-based one drops frames when subviews are complex. That statement might not be true tomorrow or next week, because the ecosystem is developing quickly. Generally I am very happy with React Native.
- vjeux 11y agoYup, being indistinguishable from native has been the absolute priority for the project. We think we managed to do it for the apps we built but we took shortcuts in the process. The two open source versions of navigator definitely don't meet that promise and it is driving me crazy. We're working on solutions for those but it takes time :)
- mrinterweb 11y agoI believe Cordova apps being associated with a "bad user experience" is related to the amount of effort developers put into their Cordova app. I've seen some terrible Cordova apps. I've also seen a couple good ones. I've been developing a Cordova app using Ember.js and it works well in Cordova. There are a couple places in my app that need to be better optimized for Android, but overall, a non-discerning user would likely never know the app was a Cordova app. One trap that I've seen many apps do is to try to emulate the UI of native apps. Emulating a native UI rarely succeeds in execution. Make the UI your own. There are ways of delivering a good user experience with Cordova. It depends on the app you're building, and how the app is developed.
- myko 11y ago> One trap that I've seen many apps do is to try to emulate the UI of native apps. This is one of the strengths of React Native. Don't emulate the native UI - use it, just access it via JavaScript.
- mrinterweb 11y agoI'm excited to try React Native for that reason alone. I love Ember.js, but developing good mobile applications with ember and Cordova (while possible) is not easy.
- jrpt 11y agoHaving used RN and, years ago, PhoneGap, I can say RN is way better. With PhoneGap you were constantly making things feel more native, and I had to do a hacky thing to speed up touch responses. With RN you actually use the native elements. RN is the real deal and I expect more and more companies to use it for new projects due to its significant advantages.