Live data from Hacker News

React Native for Android

code.facebook.com

41–50 of 248 posts

Re: React Native for Android

#41
post #28
post #12

Interestingly, they seem to be using JavaScriptCore instead of V8 as their JavaScript interpreter: https://github.com/facebook/react-native/blob/42eb5464fd8a65...

We designed React Native to run with any JS engine: jsc, v8, (wk)webview, inside of Chrome/Safari/Firefox, inside of Node, ... We released it with JSC today mostly for convenience: we had JSC setup from iOS and it works. But we're open to ship with a different engine if there are performance benefits.

Why not use the JS engine that the platform provides?

Re: React Native for Android

#42

"Today, we're happy to release React Native for Android." https://github.com/facebook/react-native/commit/42eb5464fd8a... This comes in time for Facebook to meet its pledge. http://www.reactnativeandroid.com/

What was the context for this? I assume someone at Facebook previously committed to having it available by Fall 2015 or similar?

Re: React Native for Android

#43
post #31

Earlier quoted context omitted.

Why aren't Apple and Google making it this easy to develop apps? Apple has no incentive to make it easier for app developers to port their code to other platforms.

But it does have incentive for app developers on other platforms to port code to their own platform.

They incentivize people porting to iOS by being a great platform with tons of customers, many of which are willing to pay. That's why so many apps launch on iOS first (much to my dismay as a diehard Android user).

Why Google hasn't done this, I don't know. Seems like it is in their best interest and something they're already doing internally. They use the shared web/Android/iOS code concept for Inbox (but not HTML/JS)[1] and probably other projects.

[1] http://arstechnica.com/information-technology/2014/11/how-go...

Re: React Native for Android

#45
post #6

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?

I 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.

Re: React Native for Android

#46
post #31

Earlier quoted context omitted.

Why aren't Apple and Google making it this easy to develop apps? Apple has no incentive to make it easier for app developers to port their code to other platforms.

But it does have incentive for app developers on other platforms to port code to their own platform.

Apple probably doesn't concern itself with any developers that don't want to be on their platform. In fact they probably find the notion so inconceivable that they wouldn't see any value in that developer's app.

Are there any "unicorn" apps that are Android only and intend to stay that way?

Re: React Native for Android

#47
post #20

"Today, we're happy to release React Native for Android." https://github.com/facebook/react-native/commit/42eb5464fd8a... This comes in time for Facebook to meet its pledge. http://www.reactnativeandroid.com/

Big props to the person that bought the domain and setup the countdown. It stimulated the team to actually meet this deadline :)

What was there before and why? (I'd assume a countdown, but it's not in the web archive)

Re: React Native for Android

#48
post #41
post #28

Earlier quoted context omitted.

We designed React Native to run with any JS engine: jsc, v8, (wk)webview, inside of Chrome/Safari/Firefox, inside of Node, ... We released it with JSC today mostly for convenience: we had JSC setup from iOS and it works. But we're open to ship with a different engine if there are performance benefits.

Why not use the JS engine that the platform provides?

Android does not provide JS environment that is consistent across all device types/os versions we'd like to support

Re: React Native for Android

#49
Wow, I was literally looking at this today to see if Android was announced yet. I'm working on a little side project and I was using C++ as the common language across both iOS and Android platforms. While I do, in fact, like C++ it just doesn't have the same support as more dynamic languages to do even basic things (even string splitting or trimming requires separate libraries or rolling your own code; how does a standard string library not include such things?). This looks pretty good.

I'm going to look into this. I'm mostly curious about how building works and how easy it is to setup, say, a single (or two) build script(s) that can package for either platforms and grab the necessary, common JavaScript. I'm also curious as to how easy (or difficult) it is if you wish to create custom UI components for either platform.

Re: React Native for Android

#50

Earlier quoted context omitted.

The 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.

could you elaborate on what poor decisions rn allows you to make over native ios/android?

With 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.

Post reply on HN