Live data from Hacker News

React Native at Airbnb

medium.com

251–259 of 259 posts

Re: React Native at Airbnb

#252
It looks like if you have small team and you want to develop iOS / Android prototype fast RN is good choice. This case you're looking not for "best user-experience" but "okay user experience fast".

But for big companies java/kotlin or/and Objective-C/swift native apps will be more efficient.

Re: React Native at Airbnb

#253

Earlier quoted context omitted.

That's pure nonsense. I have not seen one RN app that looks anything like native, including our own.

Why would it be nonsense, when it outputs native elements, what could give it away?

Because that's incorrect. Yes, it outputs `UIView` objects. But that's far from being native. Just a few examples: a button/"touchable opacity" is not a `UIButton`, it's a custom view where RN fakes the touch animation in JavaScript(!). Gesture recognizers are faked in JavaScript. Animation doesn't use Core Animation but fakes it either in JavaScript or in custom C++ implementation in the Animated module. It's one big lie to call React Native "Native".

Re: React Native at Airbnb

#254

Earlier quoted context omitted.

Why would it be nonsense, when it outputs native elements, what could give it away?

Because that's incorrect. Yes, it outputs `UIView` objects. But that's far from being native. Just a few examples: a button/"touchable opacity" is not a `UIButton`, it's a custom view where RN fakes the touch animation in JavaScript(!). Gesture recognizers are faked in JavaScript. Animation doesn't use Core Animation but fakes it either in JavaScript or in custom C++ implementation in the Animated module. It's one bi…

Ok, thanks for a more informative reply, I didn't know about how some of the interop between JavaScript and native broke the native bits. That's good to know. Still though, this is a subset of native functionality. It sounds like there can still be two apps one native one 'react native' that are indistinguishable as long as they use that subset. No?

Re: React Native at Airbnb

#255

Earlier quoted context omitted.

Because that's incorrect. Yes, it outputs `UIView` objects. But that's far from being native. Just a few examples: a button/"touchable opacity" is not a `UIButton`, it's a custom view where RN fakes the touch animation in JavaScript(!). Gesture recognizers are faked in JavaScript. Animation doesn't use Core Animation but fakes it either in JavaScript or in custom C++ implementation in the Animated module. It's one bi…

Ok, thanks for a more informative reply, I didn't know about how some of the interop between JavaScript and native broke the native bits. That's good to know. Still though, this is a subset of native functionality. It sounds like there can still be two apps one native one 'react native' that are indistinguishable as long as they use that subset. No?

No. I only gave you small examples. For example, system margins and guides are not taken into account by the RN layout system, causing apps to look non-native. Almost everything is implemented reinvent-the-wheel style in RN, which makes it uncanny valley (and thus, very easy to spot).

Re: React Native at Airbnb

#256

Earlier quoted context omitted.

> sent over in a declarative format like HTML? > which the client then renders into a native view. A WebView?

No

Sorry if the short response seemed rude. No is the answer to both of your questions.

RN isn’t just “HTML in a webview” like PhoneGap or Cordova: elements are actually rendered as native UI components. E.g., a element becomes a native UILabel on iOS and a TextView on Android.

Re: React Native at Airbnb

#257

Earlier quoted context omitted.

Did you test your app with VoiceOver, the iOS screen reader for blind people? The difference between non-native and native navigation is particularly noticeable in that case, unless perhaps you fire a UIAccessibilityScreenChangedNotification after navigating to a new screen. That's just the scenario I'm aware of. I haven't done any real projects with React Native, so there may be other pitfalls.

Of course not. They are a lazy developer that care little about the user experience.

As passionate as I am about accessibility, I try not to use an accusing tone. There's no way we can know the state of mind, priorities, and constraints of the developer in question. Even large companies don't have unlimited resources. So we can't fault developers for looking for ways to do more with less. We just need to do what we can to make sure developers are informed about the pitfalls, and plead with them to consider important user experience factors like accessibility.

Re: React Native at Airbnb

#258

Earlier quoted context omitted.

I think you mean 'built-in' into react native? Facebook routinely lets the community settle on the correct api aside from a limited core. E.g. react router on web has gone through many versions and there are several community libraries for doing web navigation and how you want to track that application state.

And as a result there's a ton of churn, waiting for third parties to update their libraries (sometimes forever) and beginners having to make choices on how to do the most basic things without the experience or knowledge to help them make good decisions.

It's just beyond the needs of fb and what they cared to provide for. No one is paying for the extra dev work, so until some other entity pays or volunteers that will be the situation. Incidentally, Expo did extend RN to cover many of the missing APIs. It's just the reality we live in.

Re: React Native at Airbnb

#259
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 have a new tool that we're trying internally to design cross-platform components - https://github.com/airbnb/Lona pretty early still, but the idea is that short-term it generates assets that fit into our existing Figma / Sketch product design workflows for consumption. having a cross-platform source of truth for _components_ is higher impact than outputting their _consumption_. this was mostly the reason we first…

Thanks very much. I'll take a look at Lona.

A couple of days after I posted that I started thinking about whether it would be possible to develop a sketch plugin to render react components onto artboards, then I googled my way into your react-sketchapp and a talk you delivered at ZEIT. You guys are doing some really cool and useful work. Thanks!

Post reply on HN