Live data from Hacker News

React Native for Android

code.facebook.com

181–190 of 248 posts

Re: React Native for Android

#181
post #61

Earlier quoted context omitted.

More accurately: with Cordova, you will always be behind on iOS.

Speaking as a web developer, this is sad, but true. However, what's even sadder to me is the fact this continues to be true despite the fact that, believe it or not, the web has been the platform where most of the innovation in UI development paradigms has been taking place in the past few years. And I don't just mean in terms of the sheer number of new things coming out. The web community pioneered UI development pa…

I was pleasantly surprised that the latest Chrome for Android delivers push notifications for Facebook due to a new W3C API, and Facebook's mobile web interface has been in good shape for some time, so right now Facebook's native app is completely optional. Which is a good thing, given how many permissions Facebook's app requires. Apparently this was announced back in April, but I just noticed it, due to Facebook being updated: http://blog.chromium.org/2015/04/reaching-and-re-engaging-us...

Along with other things such as the app manifest, Chrome on Android is leading the pack in terms of making the mobile web feel native. Previously this title belonged to iOS Safari, unfortunately Apple dropped the ball a long time ago.

I've been a long time Firefox user and I'm using Firefox on Android as well. But I do think they could do a better job, I mean I'm all for Firefox OS and what that means for Mozilla, but I feel their Android effort is subpar and that's a shame, given that Android is the modern Windows and there's plenty of room for Firefox on it. I mean right now Firefox is the only app I have that wasn't updated for the material design guidelines and they didn't even try to fake it. And that would be OK, but I've been waiting for things to get fixed ever since forever, like the Add to Homescreen functionality which is completely broken.

But anyway, people that bemoan web interfaces are usually ignorant of present day web interfaces that people use.

You can't name an email client that's more usable than GMail's web interface. And surprisingly FastMail on a mobile browser is almost as usable as native GMail, being all web. Facebook and Google Maps are 2 other example of having awesome mobile web interfaces. Of course, people focus on shiny rather than utility. But I don't care how usable or shiny your iMessenger or your FaceTime is, because I don't own an iOS device, not anymore. And your native app might be great, but if it doesn't have a web presence, I personally don't care much about it because I change devices often.

Re: React Native for Android

#182
post #168

Earlier quoted context omitted.

It is possible to build an app purely in JS. The Facebook Ads Manager was built by a team where some people had mobile development experience and several people only had JS experience.

wow, we can expect whole lot of mobile apps then? There must be 10x web developers as mobile developers, at least?

Don't know the numbers exactly but I would say it's less than 10x.

Re: React Native for Android

#183
post #179
post #170

Earlier quoted context omitted.

yeah > Facebook Ads Manager is built entirely using React Native. https://code.facebook.com/posts/1014532261909640/react-nativ...

Ads Manager =/= Facebook app for "users"

I think I see where the confusion is, muzmath said 'a' facebook app (i.e. Ads Manager), not 'the' facebook app. Main FB app is definitely not using 100% react native.

That being said, Ads Manager users are still mostly just "users". I know a middle aged woman using it to manage ads for her side business for example, regular people are using 100% React Native apps daily.

Re: React Native for Android

#184

Can I work on React Native Android apps on Linux?

It works quite well actually, I tested it for a bit using the tutorial. I haven't found any real issues. Only the chrome inspector isn't working for me, but that might be caused by the Android emulator.

I wasn't able to run the react-native web server on Linux.

Re: React Native for Android

#185
post #163

Earlier quoted context omitted.

Not having used ReactNative before, how would that change? Wouldn't you still have to at least redeploy the app to the phone if you change the JS?

> Wouldn't you still have to at least redeploy the app to the phone if you change the JS? No, that's the beauty of it. All you need to do is shake your phone and tap the "Reload JS" option. Those JS files are served by some sort of a server that starts up on your dev machine when you first deploy the app. See https://facebook.github.io/react-native/docs/tutorial.html#d... (search for "reload js").

I assume this is only in dev mode, as opposed to release mode?

Re: React Native for Android

#187
post #119

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…

> Which is unlike using Ionic Framework, where I've gotten about 98% code reuse between platforms. Ionic is using HTML widgets , not actual IOS or Android widgets like React Native , Titanium or others. So you are basically developping an HTML client inside a webview and calling it an APP. Of course you'll be able to reuse 98% of the code that ran into a web browser. But it will look like an HTML website.

> But it will look like an HTML website.

This is simply not true anymore. For simple CRUD apps, our customers can't tell the difference between a native app and an Ionic app. The ionic team has done a great job simulating the native animations and interactions of iOS and Android.

If you don't believe it just try it. It costs 30 secs to install Ionic via npm and deploy one of the demo apps to an Android or iOS device.

For more complex apps I'd consider using a native framework tho. As usual it all depends on the use case.

Re: React Native for Android

#188
post #164
post #91

Slightly off topic but I'm curious about using React Native vs WebView with native wrapper and components. I'm a developer who primarily codes in Ruby. I'm working on a side project that will be mostly CRUD and have no DOM updates. The application will need to support web, mobile, and tablet. I'm considering using React so I can use React Native but I'm afraid I'm adding a level of unnecessary complexity. Originally,…

I would just make the project a webapp, and make sure that the site works well on mobile. Later on, when you have traction, and probably users, you can code up a native app for it (or if you have a lull of things to do and get bored :P)

> Later on, when you have traction, and probably users, you can code up a native app for it (or if you have a lull of things to do and get bored :P)

Maybe. Maybe not. Nowdays it's all "mobile first" so I'm not sure a web app is necessarily the base way to gauge user engagement.

Re: React Native for Android

#189

Earlier quoted context omitted.

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…

> 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, so most apps just use the default web technology which include things like a built-in 300ms delay, no response to clicking a link, etc.

Re: React Native for Android

#190

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…

Started out building our apps in Ionic, but switched to React Native as soon as it was released. The Ionic app just didn't feel native. Not even close. React Native has been absolutely amazing so far. So excited for Android!

Ionic has started to feel native only recently, but I agree that React Native for iOS (and now Android) sounds like a superior alternative. I'm very tempted to try it in my next project.
Post reply on HN