Hacker News new | comments | show | ask | jobs | submit login

This is huge. 87-99% shared code between iOS and Android. Someday companies as big as Instagram won't need to have entire separate product teams for separate platforms.

> React Native allowed product teams to ship features faster to both our iOS and Android apps. The list below shows the percentage of code shared between the apps for some of the products, which could be used as a proxy to measure how we managed to improve developer velocity:

Post Promote: 99%

SMS Captcha Checkpoint: 97%

Comment Moderation: 85%

Lead Gen Ads: 87%

Push Notification Settings: 92%

I'm working on a project where we are recreating a native app using React Native. We've found similar results; about 90% of our code is shared between both platforms. We also build both platforms every time, so both apps match really well. I'm not sold on React yet but this is a major plus to the platform.

Yep, I can confirm the same. I've shipped two reasonably complex react native apps, both were about 80-90% shared code.

Areas where we diverged were things like permissions on Android versus iOS, code that has to run in the background while the app is not foregrounded, material design stuff.

How did you do the Material stuff on React Native?

We used this and special cased for Android:


That seems like a big plus for React Native.

What are the negatives you have found?

To add to the good responses by the others, React Native development, on a good day, feels like the best of web dev and native dev (reload to see the change, `yarn add <package> && react-native link` to add a new NPM package, run the app on devices while debugging with Chrome dev tool). On a bad day, it feels like the ultimate force unification from the worst of both worlds (nothing ever stays stable, ever; were you expecting the app reload to work every time? hah!; running the debugger makes the app crawl, even on recent devices; some packages require you to do lots of stuff for post-install configuration; upgrading RN version will fix some issues but you'll lose half day trying to resolve conflicts between RN and your code and RN and the dependent packages -- then you might get some issues that are unique to the new version of RN; CSS styling -- can cut both ways)

In my particular case, being a solo dev with web background, RN is the only sane option to make an app in Android and iOS in reasonable time.

I'd say it can be a good tech choice, if you plan to focus your work on platforms that React API and ecosystem touch (mobile and web, maybe not desktop).

EDIT: Some grammar cleanup and the bit about styling.

This perfectly describes my experience with RN. Overall, a positive experience, but some days are the worst.

One big negative for me so far is that you can't go the last mile (sometimes even the first) if you don't already know a lot about both iOS and Android development. I've written an app with Cordova and never really touched xcode or did anything specific for each platform.

Also, every library (addon/plugin/whatever) I've tried to use so far has not been even close to up to date with the current version of RN.

Error messages are beyond cryptic.

I'm sticking with it for now, but compared to traditional web dev, it feels like coding in quicksand.

> One big negative for me so far is that you can't go the last mile ... if you don't already know a lot about both iOS and Android development

To me it's actually one of the strongest points of RN. It's not trying to shun away the build/custom native wrapper part in favor of a magical solution; instead, it's giving you full control and full power on how you want things done.

Things like Cordova have been easy and great for simple stuff, but anything that is a little bit different or needs real performance is impossible or extremely problematic to achieve. Not on RN. It can be difficult, as creating a custom native UI requires a lot of knowledge of both native platforms, and a lot of boilerplate. But the end result is superior in every way to what HTML wrappers can do.

Rather than RN being a solution of one-size-fits-all like what some platforms want to be, I look at it from another angle: it still requires native mobile devs with native knowledge, but offloads 90% of the UI/business logic effort to this one universal platform. That's what most no-compromise cross-platform apps need.

I was at the SF React Native developers meet up the other night, the speaker (Devin Abbott) gave several nice pro/con's slide re react native. Here's a picture of the slides:

http://imgur.com/a/T3O7i http://imgur.com/a/z2oIU

Great comparison. Slides transcribed:

-- Slide 1 --

Maybe we should use React Native:

- We know JS / React

- We have lots of web developers but few mobile

- Our design is brand-focused

- We're willing to invest in RN

- We want to get into OSS

- We want OTA code updates

Or maybe we shouldn't:

- We don't know JS / React

- We already have an iOS team and an Android team

- Our designs are heavily platform-specific

- We don't have the time or money for an RN team / OSS

-- Slide 2 --


- Cross-platform

- Performant, native feel (with some effort)

- Great developer experience

- Push updates over-the-air

- Strong community

- Backed by Facebook


- Early

- Unstable (bugs, APIs)

- Ecosystem not fully developed

- Polished apps are high effort

- You may need native code (so JS + Obj-C + Java)

Thanks for this.

The thing that captured my interest was the point about being backed by Facebook. Parse was backed by Facebook and look where it is now.

I don't think Facebook backing Parse is relevant. React Native was designed by Facebook, so I'm assuming they understood the design choices of the mobile ecosystem at the time.

Parse was an acquisition by Facebook that didn't end up working out.

I'll add that we use RN in our production apps and are building it for ourselves but never used Parse in the same way.

Awesome, thanks!

Right now I will wait a little more and see how the tech evolves. Been burned by too many miracle technologies

Yeah, it really depends on what your needs are. React Native has a lot of cool features but it also has quite a steep learning curve if you are new to React or new to Native development.

Are you not sold on React, or React Native? If you're talking React for Web, we're in a similar boat, where we want to use React Native for mobile, but for our larger website app, something else....

Any chance you also evaluated https://www.nativescript.org/? How those two compare?

NativeScript seems very imature for me, especially their promised integration with angular2. Compared to React Native, I really felt that it is not a competitor yet.

So like a Qt app then.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact