Live data from Hacker News

React Native for Android

code.facebook.com

51–60 of 248 posts

Re: React Native for Android

#51

Question for everybody doing some sort of cross platform mobile dev. How common is it to have NO experience with a platform's native libraries? In other words you didn't go from ObjC or Java to React Native/Cordova/Xamarin to try and re-use code but because you know JS or C# and weren't concerned about learning the native platform. For any that started out with no native platform knowledge did you start to dip into i…

I would love to see some discussion around this as well. I have been playing with Apache Corodova and Windows 10 SDK lately and they look very promising. Being a web developer, I found them to be easy to get started.

Are there complex apps built using phonegap/swift/cordova? What are the limitations? I know Facebook tried with a 'web app' approach and reverted back to native solution. But that was years ago.

Re: React Native for Android

#52

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 :)

We've updated the post with a comparison of screenshots, sorry about that!

Thanks!

Re: React Native for Android

#53
post #12

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

As I recall, they announced that alongside React Native in January. I believe it was to avoid subtle differences between the JS executed on various platforms (e.g. to prevent a component from using a feature supported in V8 but not JSC).

There are a bunch of other benefits of this, e.g. we use same API on both platforms to hook up profiling. We definitely want to experiment with other JS VMs in the future though.

Re: React Native for Android

#54
Are any businesses avoiding using React because of the power it gives Facebook - where they can sue you however if they infringe on your copyright or patents or other then you can't sue them because you'll lose the license to use React - along anything else they've released?

You can say it is a fair practice for a private company, however I am wondering what business operations and founders are thinking.

Re: React Native for Android

#55
post #22

Earlier quoted context omitted.

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

Which is unlike using Ionic Framework, where I've gotten about 98% code reuse between platforms. The only place that I usually end up making platform-specific changes is where Ionic has an iOS-specific layout change that breaks the look of a custom component on iOS. That and sometimes native-only features like Push Notifications that need to be handled slightly differently on each platform. But the latter is about a…

If you want the exact same app on both platforms, you can do that on React Native too. The Facebook apps don't do that because we believe it gives a worse user experience.

Re: React Native for Android

#56
post #54

Are any businesses avoiding using React because of the power it gives Facebook - where they can sue you however if they infringe on your copyright or patents or other then you can't sue them because you'll lose the license to use React - along anything else they've released? You can say it is a fair practice for a private company, however I am wondering what business operations and founders are thinking.

I'm not a lawyer, but you might have missed this clause in the patent grant:

> Notwithstanding the foregoing, if Facebook or any of its subsidiaries or corporate affiliates files a lawsuit alleging patent infringement against you in the first instance, and you respond by filing a patent infringement counterclaim in that lawsuit against that party that is unrelated to the Software, the license granted hereunder will not terminate under section (i) of this paragraph due to such counterclaim.

Also consider that most open-source licenses make no mention of patents at all, so you have no assurance that the company won't come after you for patents in their software.

Re: React Native for Android

#57
post #31

Earlier quoted context omitted.

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?

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

Chrome? Also Gmail, Google Now, and Facebook Messenger on iOS are garbage compared to Android.

Re: React Native for Android

#58
post #51

Question for everybody doing some sort of cross platform mobile dev. How common is it to have NO experience with a platform's native libraries? In other words you didn't go from ObjC or Java to React Native/Cordova/Xamarin to try and re-use code but because you know JS or C# and weren't concerned about learning the native platform. For any that started out with no native platform knowledge did you start to dip into i…

I would love to see some discussion around this as well. I have been playing with Apache Corodova and Windows 10 SDK lately and they look very promising. Being a web developer, I found them to be easy to get started. Are there complex apps built using phonegap/swift/cordova? What are the limitations? I know Facebook tried with a 'web app' approach and reverted back to native solution. But that was years ago.

Using Cordova, you will always be behind any and all Mobile Safari WebKit et al bugs. This not a big deal when pushing layout around a webpage, but it can be crippling for app development as the app grows in complexity and you crave native-quality interactions. Mobile Safari's Webkit implementation has a staggering list of severe bugs. Developing under it can become a nightmare of hacks and backpedaling. Been working on Cordova nearly full time for two years now. So much wasted time. React Native is a big deal, and is very different.

Re: React Native for Android

#59

Question for everybody doing some sort of cross platform mobile dev. How common is it to have NO experience with a platform's native libraries? In other words you didn't go from ObjC or Java to React Native/Cordova/Xamarin to try and re-use code but because you know JS or C# and weren't concerned about learning the native platform. For any that started out with no native platform knowledge did you start to dip into i…

Game developers do it all the time with C++ using things like Marmalade.

Re: React Native for Android

#60
post #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?

It's the 'blogpost' link in this page, http://facebook.github.io/react/blog/2015/03/30/community-ro...
Post reply on HN