Live data from Hacker News

React Native for Android

code.facebook.com

21–30 of 248 posts

Re: React Native for Android

#22
post #4

When porting a React Native app to android 85% of the iOS version was reused: "At the time of shipping Ads Manager for Android, that approach yielded around 85 percent reuse of app code."

Yeah, the promise is not "write once, run everywhere". It's 1) write in a familiar way and 2) reuse a substantial amount.

Re: React Native for Android

#26

Why are there only iOS screenshots in an Android blog post? I want to see the results of creating an Android app. EDIT: screenshots were added :)

There's a video with the Android app in the section Shipping an Android version.

Re: React Native for Android

#27
post #8

Earlier quoted context omitted.

React Native apps compile into native apps. That is, no Cordova.

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

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

Re: React Native for Android

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

Re: React Native for Android

#29
I was googling to find out if this had come out late, late last night. Found the countdown site and figured it'd be here within a month, so might as well start laying down some wireframes and plans for the app I've been wanting to build with it. Lo and behold, this morning...

Suffice to say I am very excited for this. I've been really impressed with React and what it has done for frontend development, and I can't wait to see how it translates.

Re: React Native for Android

#30
post #9

Yes! I've been working with React-Native on a side project for a few weeks now. WHAT A GODSEND! Before this, I was using Titanium, which is heavy, slow, and difficult to integrate with. React-Native felt like home. On a related note; Why is it up to Facebook to develop something like this? Why aren't Apple and Google making it this easy to develop apps? ObjC is a nightmare, 90% of apps out there don't need that level…

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.

Sure, but that works in reverse. People could easily port their code TO iOS.
Post reply on HN