News for hackers. Stuff that matters.
Re:Why did Airbnb dump React Native? (2021) by enra on Tuesday August 16, 2022 @07:08PM (#32490205)
This is very inaccurate in many aspects, not sure if actually anything accurate in this except the fact that Airbnb did use and eventually dumped RN (source: I worked at Airbnb 2015-2019 on the platform team).

As others have linked, Airbnb actually did write a summary about this.

Basically what went down: For years Airbnb had actually pretty strong native mobile engineering both on iOS and Android (some of the best engineers I’ve worked with) there was no issue investing more in to it. The had the resources, platforms were working well.

The main challenge however was that anything the company needed to launch, needed to be built on 3 platforms at the same time (4 if you count tablet). Timelines were often tight which made the overall coordination between the platforms tough.

One the main examples of this was when 2015-2016 team I was part of basically redesigned and rebuilt the mobile apps, and created a design system/component/layout library at the same time for each platform. It was a huge effort.

At the same time, there was one guy basically hacking on React Native and ended he built the whole component system by himself in few weeks, compared to the months it took in native platforms. This was obviously impressive and company decided to experiment if we could use RN more to speed up development. I think the idea was never to fully replace the native platforms or even core flows, but there were lot of random flows and screens in guest and host apps which only minority of the users see.

So 2016-2019 there was a core team working on a RN adoption, and different people and teams used it in different projects. There were some technical issues at times with performance and navigation that got eventually solved.

However where it all came down was there wasn’t that much adoption and there wasn’t clear group who would actually use RN. Mobile engineers didn’t want to write RN code and web engineers didn’t want to build on mobile. RN also requires understanding of the native platforms, and if the point is build both for iOS and Android, then you need to understand both platforms which is a rare skill set.

So in the end it was just more complicated than it was worth.

I think new company/product can build the team and culture around RN will have better success.

I’d still think if it’s the right choice given what you are building. No matter how good you are I think the RN/Flutter apps can be ok it’s really hard to make them feel fully native.

Re:Why did Airbnb dump React Native? (2021) by hamstergene on Tuesday August 16, 2022 @10:41PM (#32491679)
I have never seen cross-platform UI that would work and/or look close enough to native. It has always been classic "choose any two": cross-platform, UI, great.

There were many people who claimed they have achieved all three, but at the close examination all of them, 100% without exception, were missing many little things like standard shortcuts, respecting color preference in user settings, or just couldn't see the difference between 11pt and 13pt fonts while looking directly at them.

10 years ago I worked on rewriting Qt interface of a desktop app back to native for a similar reason, and now I am reading all the same story except it's about React Native in mobile apps.

Re:Why did Airbnb dump React Native? (2021) by retor on Wednesday August 17, 2022 @01:57AM (#32492822)
> I have never seen cross-platform UI that would work and/or look close enough to native.

But wouldn't knowing that require that you investigated the tech choices of all the apps you are using? If not, there's a slight fallacy in that you only _know_ that the app is cross platform when you can see that it is. So then obviously all the apps you know is cross platform will look out of place, because that's how you know they are cross platform. Not sure I'm making the argument very well.

For instance, I'm don't think that the Discord app for iOS and Android looks out of place [0].

> Switching to React Native for the Android app means an experience that is ever-improving at a more rapid pace across every platform Discord is available on, while still retaining Android and iOS specific patterns in the UI.

[0]: https://discord.com/blog/android-react-native-framework-upda...

Re:Why did Airbnb dump React Native? (2021) by FlyingSnake on Wednesday August 17, 2022 @02:10AM (#32492878)
The discord user complaints rose exponentially after the switch to RN, and almost all users felt a perceivable difference in the quality of the new apps.
Re:Why did Airbnb dump React Native? (2021) by retor on Wednesday August 17, 2022 @02:45AM (#32493074)
Hehe, I guess I was too late to party to experience the good ol' days.

It has a good rating in app store today. Better than Slack, even. And although there are probably many reasons for that, atleast RN hasn't killed the ratings.

Re:Why did Airbnb dump React Native? (2021) by DanielHB on Wednesday August 17, 2022 @11:40AM (#32497799)
this is quite normal when you do a full codebase refactor, even if you didn't switch technologies it is like comparing a 5 year old codebase with 1000s of man-months ironing bugs out with a 1 year old codebase with 500 man-months of work

Seems like the bigger problem is their QA department than their engineering decisions

Re:Why did Airbnb dump React Native? (2021) by hamstergene on Thursday August 18, 2022 @01:52AM (#32505787)
> But wouldn't knowing that require that you investigated the tech choices of all the apps you are using?

I did investigate every app I ran, because I was programming UIs and was interested in all tech that was there. To the point of being able to tell whether the app was written with Delphi or Qt or MFC/ATL by just playing with it.

Qt apps on Mac always stand out, being "OK" is the top they achieve.

Windows is less offended because it has never had a stable style, but still, there are always tiny details like context menus or not responding to Ctrl+Arrows that give non-native away.

Re:Why did Airbnb dump React Native? (2021) by andrewf on Wednesday August 17, 2022 @02:47AM (#32493093)
I shipped consumer software with Qt in the 2000's. It was nicer to work in than MFC. It looked and worked great on Windows 98/2000/XP. Qt's Windows XP renderer called Windows' own uxtheme.dll to draw everything.

Mac OS X looked a little off, especially the spacing.

Re:Why did Airbnb dump React Native? (2021) by fpoling on Wednesday August 17, 2022 @02:04AM (#32492840)
Is the point of React Native to use native GUI elements and not to emulate the platform look and feel?

A few years ago I worked on Java application using SWT. It looked very OK on Linux/Mac/Windows. Even original AWT in Java was cross-platform an native. The problem with Java was GC pauses, but this is a solved problem now.

Re:Why did Airbnb dump React Native? (2021) by nrdvana on Thursday August 18, 2022 @04:05PM (#32514231)
20 years ago I worked on some Java applications as a college student curious to compare AWT/Swing to other options, and I found that the cross-platform rendering worked decently well, but that the underlying architecture and algorithms were hot garbage. For instance, if you had a full-screen panel nested in a full screen panel, and you put the CPU under heavy load, you could watch it fill both background colors despite the front panel completely obscuring the back panel. Using Windows native API "windows" the paint events would only happen for the un-obscured components and only for the regions exposed. Java advocates advertised how "lightweight" their components were because they "didn't depend on a heavy-weight operating system window object" when in fact those "heavyweight" window objects were part of an algorithm that performed much better. Another big annoyance was that every UI event was delivered in its own thread, so you had to deal with all the complexities of multithreading just trying to write simple user interfaces. I had a whole blog-sized article I wrote once about all the design deficiencies; I've forgotten most of the rest of those details.

Java actually succeeded quite well at being cross-platform, it just wasn't a design worth being cross-platform in the first place.

Hopefully they fixed some of this in 20 years.

Re:Why did Airbnb dump React Native? (2021) by wiseowise on Wednesday August 17, 2022 @02:39AM (#32493038)
React Native literally uses native widgets.
Re:Why did Airbnb dump React Native? (2021) by myko on Saturday August 20, 2022 @11:09AM (#32532579)
The JavaScript bridge is still quite slow, though.
Re:Why did Airbnb dump React Native? (2021) by tmpz22 on Tuesday August 16, 2022 @08:29PM (#32490859)
> Timelines were often tight

I wonder if those tight timelines seem justified in retrospect. The stress. Missed social events.

Re:Why did Airbnb dump React Native? (2021) by djbusby on Tuesday August 16, 2022 @08:57PM (#32491011)
Management that sets that aggressive delivery schedule isn't working late to meet the schedule. They don't miss the social events.

Engineer stress is manager success. You get burnout, they get payout.

Re:Why did Airbnb dump React Native? (2021) by v0idzer0 on Wednesday August 17, 2022 @12:22PM (#32498353)
> You get burnout, they get payout

I want to put this on a t-shirt

Re:Why did Airbnb dump React Native? (2021) by gigel82 on Tuesday August 16, 2022 @08:37PM (#32490902)
> Mobile engineers didn’t want to write RN code and web engineers didn’t want to build on mobile

That's interesting. In our experience, we're having a difficult time hiring folks that want to write native (including UI) in antiquated languages and frameworks - but it's much easier to hire JavaScript folks that just hack at RN.

Of course, someone still needs to stand up the actual platform, as well as write shared (and sometimes platform specific) pieces of functionality mostly in C++ so for now I guess us oldtimers still have some job security :)

Re:Why did Airbnb dump React Native? (2021) by wingerlang on Tuesday August 16, 2022 @11:56PM (#32492148)
This is an iOS only perspective, but it sounds like you are not actually looking too hard for iOS developers?.

No iOS developer considers Swift antiquated (because it isn't). I'd argue no one even considers UIKit antiquated (middle aged, maybe). Maybe with the exception of brand new iOS developers who has jumped on the SwiftUI-only bandwagon. SwiftUI itself is so new that it barely is production ready.

Sounds to me like you are actually looking for web developers who doesn't want to start learning native, but are OK to do the work in JS.

Re:Why did Airbnb dump React Native? (2021) by gigel82 on Wednesday August 17, 2022 @12:52AM (#32492502)
Sorry, just realized most folks associate React Native with mobile. We target that too, but we're mostly targeting desktop platforms (via React Native Windows and React Native macOS) - and in our case antiquated really means antiquated (think old-school custom XML-based UI framework).
Re:Why did Airbnb dump React Native? (2021) by tomduncalf on Wednesday August 17, 2022 @05:09AM (#32493978)
How are you finding using RN on desktop? When I last looked into it (more than a year ago) RN Mac felt a bit lacking. There was no way to do drawing of custom paths (eg SVG) for example.

Ended up using react-native-web in an Electron container to make a desktop version of an RN app, which worked surprisingly well.

Re:Why did Airbnb dump React Native? (2021) by wingerlang on Wednesday August 17, 2022 @02:12AM (#32492885)
I see, in that case I understand it more.
Re:Why did Airbnb dump React Native? (2021) by dimmke on Tuesday August 16, 2022 @09:05PM (#32491052)
Yeah they think they know React Native until they have to debug something that is outside the happy path that is provided to them.

These people probably have never worked on a production RN app or done upgrades and maintenance for one.

Re:Why did Airbnb dump React Native? (2021) by dimmke on Tuesday August 16, 2022 @11:47PM (#32492097)
I want to clarify since this is getting upvoted, I still think RN is a better option than maintaining two separate apps in the vast majority of cases.

It just suffers because everybody "knows React" so how hard could it really be and people get hired into roles working on RN with very little understanding of how it's different from a web based React project.

Re:Why did Airbnb dump React Native? (2021) by metadat on Wednesday August 17, 2022 @12:54AM (#32492509)
The promise of achievable unification with high-quality polished UX ends up being empty. React is complex.
Re:Why did Airbnb dump React Native? (2021) by FlyingSnake on Wednesday August 17, 2022 @02:13AM (#32492897)
> folks that want to write native (including UI) in antiquated languages and frameworks

I’m which land is Kotlin and Swift antiquated? Both a modern and cutting edge technologies with stellar toolchain and 1st class IDE and platform support.

Re:Why did Airbnb dump React Native? (2021) by programmarchy on Tuesday August 16, 2022 @09:31PM (#32491220)
I wouldn’t call Swift (or Kotlin) antiquated. I’m sure it’s easier to hire JavaScript developers to hack on React Native because the talent pool is larger, but I’d wager your app quality will suffer. Depending on the app, sometimes a first class user experience just isn’t a high priority, in which case native-focused developers aren’t going to be attracted to working on it.
Re:Why did Airbnb dump React Native? (2021) by dimmke on Tuesday August 16, 2022 @11:30PM (#32492010)
>I’d wager your app quality will suffer.

I really dislike this argument, and it comes up every time React Native is discussed. I think it's a holdover from Ionic style mobile applications that simply emulated native UI in a webview. It was awful - especially when the native UI changed and the Ionic apps didn't. It's likely you use RN apps every day and don't even notice because they're indistinguishable from native apps.

React Native is designed to compile down to native code and it uses native UI frameworks. The documentation on how it does this is very thorough. The problem is not React Native in my opinion. It's the native UI frameworks for iOS and Android. These frameworks have a lot of issues and taming them often requires developers with a lot of time and experience in that specific domain. Which is stupid and wasteful.

Here's a story from yesterday of how Apple's SwiftUI (their much vaunted successor to UIKit, a very flawed framework itself) is struggling to construct basic settings views in the new version of MacOS: https://daringfireball.net/linked/2022/08/15/ventura-system-...

Not to mention the criticism of Swift as a language and how it has evolved, including the original creator leaving. And how complicated doing a fucking substring is: https://stackoverflow.com/questions/39677330/how-does-string...

In my opinion, Flexbox is a perfect way of laying out elements on a 2D screen. It's way less confusing than the complex constraints system that UIKit used. React Native's implementation of it works well. Kotlin and Swift as DSLs do not need to exist. They are solutions in search of a problem. Designed by big tech to moat their platforms.

Unless you're building an app that has a very non standard UI or a game, it doesn't make sense not to use React Native in my opinion.

Re:Why did Airbnb dump React Native? (2021) by programmarchy on Wednesday August 17, 2022 @01:03AM (#32492549)
There’s always going to be a performance penalty for React Native applications because of the JavaScript bridge, and on iOS you’re giving up ARC memory management for your app logic. For basic stuff you can write it off, but doing anything cutting edge like AR, custom graphics drawing, custom text layout and input, etc. is off the table. Even picking up a new iOS feature (e.g. focus filters) is a pain because you need to maintain a layer of bridge code, or wait for a third party module to catch up.

One somewhat direct comparison is Discord (RN) vs Telegram (Swift) on iOS. Discord has put a massive engineering effort into their app but switching channels still often feels glitchy and sluggish whereas Telegram’s layouts snap into place instantly. Telegram feels more solid, and it also properly wires up all the little iOS features like haptic feedback, pull to refresh, etc. whereas Discord mutes all of that and feels less lively.

Regarding constraint-based layouts, they can actually be much simpler in many cases because they help you avoid deep layers of nesting. They also ensure consistency (leading and trailing margins, safe areas, etc.) Again, trade-offs that deal in performance and uniformity with the platform.

For CRUD type apps, it probably doesn’t matter. But like I said those probably aren’t the types of apps native developers would be most interested in building.

Re:Why did Airbnb dump React Native? (2021) by kuschku on Wednesday August 17, 2022 @12:45AM (#32492466)
Look at the new Discord app. It's significantly slower than previously ever since the switch to react native, and has significantly more hangups.

React native works maybe fine if your target device is the highest end iPhone, but if your users are on Android One devices, it's not going to work nearly as well.

That's aside from the layouting being obviously off compared to the native layout engines.

Re:Why did Airbnb dump React Native? (2021) by wiseowise on Wednesday August 17, 2022 @02:43AM (#32493055)
It works just fine if you actually profile and see what are the bottlenecks.
Re:Why did Airbnb dump React Native? (2021) by kuschku on Wednesday August 17, 2022 @02:59AM (#32493150)
I'd love to, sadly it doesn't appear to be open source ;)

I can say from comparing pre-RN and post-RN apps side-by-side on a Nokia 6.2 it's definitely much slower (scrolling immediately drops frames, opening/closing the keyboard and other reflows e.g. multiwindow cause the app to hang for seconds).

Re:Why did Airbnb dump React Native? (2021) by tled on Wednesday August 17, 2022 @09:05AM (#32495798)
> Kotlin and Swift as DSLs do not need to exist. They are solutions in search of a problem Don't know what your problem is, Kotlin and Swift are both superior to JS
Re:Why did Airbnb dump React Native? (2021) by dwaite on Wednesday August 17, 2022 @01:17AM (#32492620)
> Here's a story from yesterday of how Apple's SwiftUI (their much vaunted successor to UIKit, a very flawed framework itself) is struggling to construct basic settings views in the new version of MacOS:

A journalist who is not an iOS developer saying something 'feels wrong' doesn't mean much in terms of quantitative evaluation of SwiftUI.

Others have already commented elsewhere on the source material (a list of UX nits) was based on a one month old beta release, and many had already been fixed at the time the list was published - something the author of that list neglected to point out at first.

> Not to mention the criticism of Swift as a language and how it has evolved, including the original creator leaving.

People leave. Rob Pike has mostly stopped working on Go. Graydon Hoare left Mozilla - and worked on Swift for a time.

> And how complicated doing a fucking substring is:

I don't understand your reference. String manipulation on Swift has gotten markedly easier since Swift 3 (when that page was created), but it is still meant to be correct/safe unicode grapheme manipulations at its core. Swift's character type is essentially a variable length, special-case of string.

Most Swift string criticisms come down to - if you want to treat text as offsets into a (mutable) binary buffer, work with binary buffers and not unicode strings.

> In my opinion, Flexbox is a perfect way of laying out elements on a 2D screen. It's way less confusing than the complex constraints system that UIKit used. React Native's implementation of it works well. Kotlin and Swift as DSLs do not need to exist. They are solutions in search of a problem. Designed by big tech to moat their platforms.

AppKit and UIKit's original constraint system was simple, even simplistic.

The constraint system that was built on top was sophisticated, but is generally too fiddly. You pretty much need training in the interface builder to understand how to get constraints to apply and stick.

This was quite simply because it was a bolt-on constraint solver over a layout engine with multiple decades of legacy. No layout options went away when constraints were added - instead, the system had to adapt to having (workarounds) for all the different approaches to operate concurrently.

I don't quite understand what technical complaints if any you have of Kotlin DSL or of SwiftUI's layout systems, so I can't speak to that.

> Unless you're building an app that has a very non standard UI or a game, it doesn't make sense not to use React Native in my opinion.

I'm curious what makes something a 'standard UI' when doing native cross-platform development.

Re:Why did Airbnb dump React Native? (2021) by dimmke on Wednesday August 17, 2022 @10:10AM (#32496626)
>A journalist who is not an iOS developer saying something 'feels wrong' doesn't mean much in terms of quantitative evaluation of SwiftUI.

Calling John Gruber a "journalist" is reductive. He is the inventor of markdown and has a history as a software engineer himself. He is also one of the most notable people who tracks things that many would consider obscure like Apple UI frameworks.

>I don't understand your reference https://news.ycombinator.com/item?id=32325511

The standard library and API surface of Swift has changed dramatically every release. They don't have a real problem to solve, and they know they have a guaranteed userbase of their language, so it's gotten progressively weirder and shittier over the years.

>I'm curious what makes something a 'standard UI' when doing native cross-platform development.

Not that curious, because it's pretty easy to look up what React Native offers: https://reactnative.dev/docs/components-and-apis. Things like text inputs, buttons but also bigger conceptual stuff like list views and app navigation: https://reactnative.dev/docs/navigation. Those UI elements render differently in different mobile operating systems and React Native handles both gracefully.

Re:Why did Airbnb dump React Native? (2021) by dwaite on Thursday August 18, 2022 @11:26PM (#32517333)
I like Gruber, he has a CS degree and had a brief career as a web developer (which certainly helps him write about technology as well as keep his site operational), but he has been a full-time columnist for his own tech blog for 16 years. As far as I know, he does not have experience writing client side code, either using AppKit/UIKit or using a tool like React Native.

He has plenty of people in his network who are professional developers with SwiftUI experience. However, he was talking about his gut feel from a core system service having so many UI nits from Apple, likely associating that with issues he has heard of from developers who have tried to adopt SwiftUI in their existing and/or new projects.

So thats the basis of my opinion - a quote or two from those full-time developers would added greatly to the article, significantly more his personal reaction.

As a developer with some client-side experience, I'd say the nits speak far more to Apple's MacOS development process these days than to the quality of SwiftUI. A decision was made to add it to the 13 beta and commit to shipping it, rather than hold it back for macOS 14.

Re:Why did Airbnb dump React Native? (2021) by hitekker on Tuesday August 16, 2022 @09:42PM (#32491299)
> antiquated languages and frameworks

Yikes, I hope you're not calling Kotlin or Swift antiquated. That's utterly false.

Re:Why did Airbnb dump React Native? (2021) by tuxpenguine on Tuesday August 16, 2022 @11:24PM (#32491969)
Some people think only javascript/typescript is modern. The javascript cult hopes everything to be written in js.
Re:Why did Airbnb dump React Native? (2021) by trevyn on Tuesday August 16, 2022 @09:48PM (#32491339)
Swift = effectively proprietary = antiquated.
Re:Why did Airbnb dump React Native? (2021) by junon on Tuesday August 16, 2022 @10:16PM (#32491534)
That's some interesting logic.
Re:Why did Airbnb dump React Native? (2021) by shams93 on Wednesday August 17, 2022 @01:08AM (#32492574)
Yeah the frameworks are painful to work with and require extremely powerful (and expensive) systems to develop with while js can be learned on any old low end chromebook.
Re:Why did Airbnb dump React Native? (2021) by ec109685 on Wednesday August 17, 2022 @01:08AM (#32492572)
One more thing covered in AirBnB’s blog posts is that they did eventually create a framework to make it easy to launch new experiences across platforms (versus the old way of needing to coordinate across 4). They just built it themselves and customized it to their needs versus using RN.
Re:Why did Airbnb dump React Native? (2021) by weq on Tuesday August 16, 2022 @10:10PM (#32491490)
This is what u get for jumping on a bandwagon, instead I got my company to invest in a Software companies tech.

The same Xamarin app i built in 2014, still runs, on .net7. MS nailed crossplatform in a way that an ad company is never going to invest in. They needed to nail cross-platform to keep themselves as a company relevant; they lost the platform war, then redefined it.

Just launched more apps on the platform this year, love it to death. SAme skills i learnt in silverlight, still relevant 10yrs later. Share 90% of code across every platform; and that 10% is built on native wrapped libraries which are generated off every release. MS has the infrastructure and investment like no ad or book store would ever.

Re:Why did Airbnb dump React Native? (2021) by Mertax on Tuesday August 16, 2022 @10:46PM (#32491711)
Xamarin/MAUI doesn’t get the buzz/love from HN audience that React Native and Flutter get. I think there is a lot of historical bias here. My company has found success with the dotnet stack. We are able to keep a small team of 5 developers that maintain 3 mobile apps (Xamarin), 2 desktop apps (WPF transitioning MAUI), and 1 web app (Blazor) all sharing about 50-80% of the code base. These are apps that bring our company about $7+mil in annual revenue if you include the associated hardware which dotnet/C# is well suited to interact “natively” with.
Re:Why did Airbnb dump React Native? (2021) by programmarchy on Wednesday August 17, 2022 @01:26AM (#32492672)
You’re on to something. I did a stint at a .NET shop and C# is still my favorite language. Dabbled with a Xamarin project a few years ago, and although it seemed like it would be fragile, it actually “just worked”.
Re:Why did Airbnb dump React Native? (2021) by brianwawok on Tuesday August 16, 2022 @10:27PM (#32491603)
Right. They also extend, embrace, extinguish. They also make very clunky tools for people that like to click to code.