Live data from Hacker News

React Native for Android

code.facebook.com

221–230 of 248 posts

Re: React Native for Android

#221
post #129

That could really be a game changer in mobile development.

Abstractions like these always target the least common denominator. But React has the "component" advantage so i'm not dismissing its usefulness. it's good for a category of projects.

I totally understand why you'd feel like this, but I think there are two big reasons why this is only true to a lesser extent with RN:

1) There are a ton of native APIs that accomplish exactly the same things, but have different APIs because different people built them and there's no pressure to make them consistent. Examples: layouting (just calculate x, y, width, height's of a view tree), animation, storage, networking, touch handling, the list goes on... it's a waste to have to learn the implementation specific quirks of each platform.

2) We've focused on making sure we can make apps at least as good as the native ones for the platform. Specifically this has meant exposing platform specific apis (e.g. Android's material touch ripple, iOS's gaussian blurs, etc), allowing arbitrary new ones to be added, and encouraging designers to still design their apps for each platform individually.

Re: React Native for Android

#222
post #218

I'm sorry for the stupid question, but I'm in a hurry: I don't really want to write the whole app logic in JavaScript. Is it possible in an easy way to have a React Native UI on top of a common C/C++ code base? I don't know React yet, but it gets very interesting now and I'd like to give it a try. Maybe it could completely replace Qt for me.

I'm not exactly sure of your circumstances, but this sounds doable. The public React Native API allows you to expose arbitrary pre-existing Views and expose new native functionality in modules accessible from JS. These can be written in java (or in C/C++ and exposed via JNI -- and if you structure your code properly you can also share that native module with an iOS RN app if you'd like). We also support having just p…

Thank you very much for your detailed answer. That really helps and I will finally learn React now.

Re: React Native for Android

#223
post #23

Has anyone done a comparative analysis of appcelerator vs react native? I might be up for it if anyone would like to join.

I've used both but I'm not part of the Appcelerator cult like most people who have invested in it apparently. Appcelerator is bad. Their OSS license is sketchy last I checked. But that's not its only problem. The community is driven by a module marketplace, which means a ton of okay-quality modules now cost $5 each. Not necessarily a bad thing, but React Native developers are releasing way more modules as FOSS, which is important to keep the community growing and active. Another thing that doesn't generally seem possible in my time with Appcelerator is being able to build a view hierarchy using native UI components. That is, I can't for example create a camera viewfinder as a background element and throw my UI inside of that element.

React Native in comparison has taken the path that is best for FOSS developers at every step of the way, which makes me very happy about the future of the platform.

Re: React Native for Android

#224
post #34

Earlier quoted context omitted.

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

Unfortunately everyone writes iOS first nowadays because rich people overwhelmingly own iOS devices.

That, and because development is way easier.

Re: React Native for Android

#225
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…

Objective-C is fine, and Swift even more so. If you don't know the platform sure, it is difficult, but that applies to any platform. When you learn native, all those web-tech monstrosities have zero appeal.

iOS development will always be native for me, the tools are not perfect, but they feel right, I can get stuff done in no time. Android on the other hand... I can't express how much I loathe the tools and language. So much that I stopped caring. React native might be an alternative.

Re: React Native for Android

#226
post #219
post #206

"OS X - Only OS X is currently supported" Why is this becoming popular ?

There's unfortunately a lot of non-overlapping work so we decided to release what we have finished incrementally. Most of the team uses OS X for development so it was a natural first choice. We're planning on adding the missing Windows and Linux support soon!

Do you want to give us a time-frame so we can go create http://www.reactnativeandroidforwindows.com/ and put a countdown timer on there?

Re: React Native for Android

#227
post #121

Google has been working with the alternative already: https://flutter.github.io/ . Probably usable in some months.

It uses Dart. Which despite looking like a nice language, approximately nobody knows. So I'm not sure this is really an viable alternative.

Don't underestimate the hate of Java developers for JavaScript, they would do anything to not to touch it (including learning dart, which is a nicer language than both).

Re: React Native for Android

#228
post #55

Earlier quoted context omitted.

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.

Ionic does not give you the exact same app on both platforms.

There are dozens of platform-specific styles in the CSS that make each target behave more like a native app. A custom-styled native app, but one that follows platform conventions.

I also absolutely abhor the fact that React mixes HTML with JavaScript. It just feels so completely wrong to me.

Re: React Native for Android

#229
post #74

Earlier quoted context omitted.

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…

I have had performance issues using Ionic myself, and I have been intensely dissatisfied with Cordova & its ecosystem. In addition, I have had some pain with Ionic when trying to implement special behavior, mainly due to how the internals work. React Native is much more a step in the right direction IMO, although the Ionic team's work on Ionic 2 with Angular 2 could provide an interesting paradigm to compete on that…

I haven't had performance issues with Ionic; Angular certainly has known issues with too-many-listeners, though Ionic offers a workaround for the most serious case (long list views).

Re: React Native for Android

#230

Earlier quoted context omitted.

> 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 Even on the fastest phones, web-based (including wrapped web components) simply don't offer the native experience. They come close, but there's always a slight but perceptible performance difference; and often a visual difference dependi…

> Even on the fastest phones, web-based (including wrapped web components) simply don't offer the native experience. They come close, but there's always a slight but perceptible performance difference Honestly I used to believe this, but not after the release of the iPhone 5 and 6. Though there is no perceptible difference, it takes a lot of work to mimic the UI in terms of animations, opacity, and response actions,…

> it takes a lot of work to mimic the UI in terms of animations, opacity, and response actions,

Which is already done for you in Ionic -- including disabling the 300ms delay.

Post reply on HN