Live data from Hacker News

React Native at Airbnb

medium.com

201–210 of 259 posts

Re: React Native at Airbnb

#201
post #171

Earlier quoted context omitted.

I'm not an expert in iOS or Android, but I shipped few React Native apps. Most of my debugging efforts were in webapp. In fact I don't even remember anything about debugging native layer. And I actually built few native components including integration with compass and yandex maps. Sure, it's not Ferrari, nobody outside of US has money for that kind of apps, it was just few hundred bucks for few weeks of my time, but…

C++ for business logic, with native views for the UI. Works across both platforms, does not require additional SDKs and has all the debugging tools and API available without any additional FFI work.

Perhaps Swift is a better to use as a cross-platform LLVM compiled language, as it is very close to Kotlin in terms of syntax and patterns. C++ is a huge language and has a ton of gotchas.

Re: React Native at Airbnb

#202

Isn't React Native end of lifed at Facebook? The effort is taking the best principles of React Native and focusing on Litho https://fblitho.com or ComponentKit - the effort to have a unified framework for both iOS and Android is pretty much abandoned. I think React Native is in legacy support mode rather than active innovation.

Nope they posted a blog article[0] last week about their plans. Please check your facts first next time because there’s been nothing from Facebook to indicate that.

[0] http://facebook.github.io/react-native/blog/2018/06/14/state...

Re: React Native at Airbnb

#203

Isn't React Native end of lifed at Facebook? The effort is taking the best principles of React Native and focusing on Litho https://fblitho.com or ComponentKit - the effort to have a unified framework for both iOS and Android is pretty much abandoned. I think React Native is in legacy support mode rather than active innovation.

No, it's still being worked on. To quote their latest blog post:

We're working on a large-scale rearchitecture of React Native to make the framework more flexible and integrate better with native infrastructure in hybrid JavaScript/native apps.

http://facebook.github.io/react-native/blog/2018/06/14/state...

Re: React Native at Airbnb

#204

"While debugging, React Native attaches to a Chrome Developer Tools instance. This is great because it is a powerful debugger. However, once the debugger is attached, all JavaScript runs within Chrome’s V8 engine. This is fine 99.9% of the time. However, in one instance, we got bit when toLocaleString worked on iOS and but only worked on Android while debugging. It turns out that the Android JSC doesn’t include it an…

Thanks for pointing this out. This part was my experience and as you said, it was quite frustrating. Overall the RN experience made me more skeptical about thing I usually take for granted. It really shows how hard it is for RN to work cross platform. Each abstraction layer can bring in some new problems.

You were the one who had to find this bug? That's pretty neat!

How long did it take for the Aha! moment?

Re: React Native at Airbnb

#205
post #110

Tangential to this, he says Airbnb has 100 mobile devs writing about 80k LoC of app code, 40K LoC of infra, and 220 "screens". We've got an app with about the same "dimensions", developed in a similar timeframe, with some very complex financial business logic and 2 developers working on it... what on Earth do their devs spend their time on? Is their engineering organization really _that_ inefficient?

The numbers are super off yes.

- 1 dev, 9 months project, 16k LoC excluding comments, including UT.

- 16 devs, 2 years project, 200k LoC excluding comments, including UT.

Re: React Native at Airbnb

#206
post #110

Tangential to this, he says Airbnb has 100 mobile devs writing about 80k LoC of app code, 40K LoC of infra, and 220 "screens". We've got an app with about the same "dimensions", developed in a similar timeframe, with some very complex financial business logic and 2 developers working on it... what on Earth do their devs spend their time on? Is their engineering organization really _that_ inefficient?

For real... i've had a ~4-5 dev team for the past three years, and our main application code is ~200k lines of java, ~70k lines of stored procedures, and a ton of other ancillary reporting code / etl code which i'm not counting. I just don't understand where they must be spending their time for an application of that size / complexity.

You are comparing the wrong numbers. We had 120,000 lines of RN code but RN only accounted for 10-20% of our mobile engineering.

Re: React Native at Airbnb

#207
post #110

Tangential to this, he says Airbnb has 100 mobile devs writing about 80k LoC of app code, 40K LoC of infra, and 220 "screens". We've got an app with about the same "dimensions", developed in a similar timeframe, with some very complex financial business logic and 2 developers working on it... what on Earth do their devs spend their time on? Is their engineering organization really _that_ inefficient?

You are comparing the wrong numbers. We had 120,000 lines of RN code but RN only accounted for 10-20% of our mobile engineering.

Re: React Native at Airbnb

#208
post #97

Very good write-up, thanks for posting. Some of the frustrations definitely hit home. I think for small teams and indies React Native is an awesome piece of technology that can enable them to target both platforms where it would be nearly impossible otherwise. I can understand how orchestrating the work of a huge team could introduce new issues though. It would be interesting to know why some of the infra layers that…

We wanted to leverage our existing infra to have a consistent experience between native and RN screens. For example, you want to have the same network cache.

Re: React Native at Airbnb

#209

Earlier quoted context omitted.

Having never worked with Redux, what is its point? Is it really so hard to stick app state in a JS object and databind off that?

In a simple app, no. In a really big app with tons of interdependent, asynchronously loaded state? Have fun. Redux definitely has too much boilerplate, but it does an excellent job of keeping functionality decoupled, and on a big project this ends up being way more important. When you do it right, you rarely introduce regressions when working on new features, because almost everything you do is additive: you're addin…

> The alternative is playing an endless game of whack-a-mole as an app gets too large

An alternative is another state management library.

Re: React Native at Airbnb

#210
post #110

Tangential to this, he says Airbnb has 100 mobile devs writing about 80k LoC of app code, 40K LoC of infra, and 220 "screens". We've got an app with about the same "dimensions", developed in a similar timeframe, with some very complex financial business logic and 2 developers working on it... what on Earth do their devs spend their time on? Is their engineering organization really _that_ inefficient?

I think this thread gives some good answers to this: https://twitter.com/jandersen/status/1009247005233692672. Basically, problems you get from being at massive scale and supporting a large number of devices.
Post reply on HN