Live data from Hacker News

React Native at Airbnb

medium.com

131–140 of 259 posts

Re: React Native at Airbnb

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

Re: your last sentence, Pagedraw (YC W18) is a good choice for going from design to UI components and features great Sketch and Figma integration.

Re: React Native at Airbnb

#133

Really curious as to how Flutter (and Xamarin, NativeScript, Ionic, Vue-based write-once frameworks, etc.) can overcome the difficulties expressed in this piece.

I've tried pretty hard to get into RN with a few hobby projects and I've given up. I'm wondering if PWAs are the way forward for the average data driven mobile app.

I would say they can be, depends on how they evolve.

On Windows they have access to the native APIs if signed and delivered via the store, as Microsoft is building on JavaScript development story they introduced with WinRT.

https://docs.microsoft.com/en-us/microsoft-edge/progressive-...

Re: React Native at Airbnb

#134
post #4

"Redux is notorious for its boilerplate and has a relatively difficult learning curve. We provided generators for some common templates but it was still one of the most challenging pieces and source of confusion while working with React Native." Interesting to see even Airbnb struggles with Redux

A big contributor to the difficult learning curve in Redux is the very poor naming of things. It's off the charts unintuitive, especially if you're an experienced programmer.

I imagine their thought process went like this:

Types: People like strongly typed languages, maybe if we call our events "types", they will like Redux more?

Reducers: Switch statements are so boring and uncool. Lets call this "reducer" instead of "events switch statement".

Store: Lets call the state tree "store". The term "State tree" is too explicit and a core principle of Redux is misdirection.

Actions: Mere mortals will associate the term "action" with functions and procedures, but Redux is not for mortals. "Action" will be our term for payload.

Re: React Native at Airbnb

#135
post #70

"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…

I ran into a fun one like that many years ago in IE. The JavaScript I had written was failing, but when I opened up the devtools to debug it, it worked. It turned out that in that version of IE, the console object only existed when the devtools were open. So a stray console.log call was causing an exception because console was undefined. But when I opened the devtools to see what was going on, console existed and so…

Been there, that same bug. This one bit a lot of people I think!

Re: React Native at Airbnb

#136

Earlier quoted context omitted.

Only Xamarin.Forms introduces another layer for you (it is the same concept as React Native). If you use Xamarin.iOS and Xamarin.Android you call underlying APIs directly. Although there can be issues with bindings, nothing like you will face with React Native. I am aware of why C# isn't popular among startups. It is sad because C# is a great language that has amazing tooling support. It runs everywhere - Xamarin for…

Even with Xamarin.Android/iOS I read about unique bugs that resulted in you needing to be an expert in both layers to understand. And bugs in the wrapper themselves. It's a problem with the entire design type, which has been shown throughout computing history to not work that well. And why use C# when the Java ecosystem is pretty much the same tooling wise? C# feels like a 1.2x better Java, which isn't enough.

As someone that works daily with Java and .NET platforms, C# still has a better stories around AOT and value types.

Also Sun really bombed their Java Gaming initiative (who remembers that JavaONE?) with C# becoming the C++'s complement in most studios.

Re: React Native at Airbnb

#137
post #10

Yet another company discovers what many of us did ages ago with multi-platform frameworks. Additional layers not supported by platform owners, mean extra debugging efforts tracking down which layer is responsible, catching up with native SDK features, need to be an expert at both layers, lack of integration with native debugging tools... But business always wants the Ferrari solution at the cost of a Fiat panda.

One thing weird for me is I've had issues with Javascript UIs on different platforms but Java backends running on different platforms actually have been pretty consistent. Is there something about javascript or UIs (or both) that make cross platform support difficult?

You have control of your entire backends (usually). With JavaScript and browsers, it's the wild fucking west. Modern browsers are better about sandboxing but if you give 100,000 clients a gun, they will find 100,001 ways to shoot themselves.

Re: React Native at Airbnb

#138
post #60

Earlier quoted context omitted.

Xamarin and co suffer from the same dual layer issues that react native has when I last looked into it. C# isn't that popular from a silicon valley engineering perspective, since the first class C# implementation wasn't open source until very recently. Yes mono has always be OSS, but it has also been a second class citizen too.

On the web side, yeah, though on the game side C# is very popular (largely thanks to Unity).

On desktop side as well, mainly because most developers never bother to learn what takes to make Java UIs look good like other native UIs do by default.

Even basic stuff like switching to the native L&F theme on startup.

Re: React Native at Airbnb

#139
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?

Tbf, there are several very complex host side features and customer support features that are not really readily visible to an Airbnb booker. I was trying to list my space and came across the workflow.

Re: React Native at Airbnb

#140
post #10

Yet another company discovers what many of us did ages ago with multi-platform frameworks. Additional layers not supported by platform owners, mean extra debugging efforts tracking down which layer is responsible, catching up with native SDK features, need to be an expert at both layers, lack of integration with native debugging tools... But business always wants the Ferrari solution at the cost of a Fiat panda.

I'm getting a pretty good React Native app working without understanding any Objective C or Swift underlying stuff. Sometimes you just want a Honda.

You are getting your users a pretty bad experience because you are lazy and only think about yourself. Users want Porsches, and they deserve them.
Post reply on HN