[HN Gopher] Why did Airbnb dump React Native? (2021)
___________________________________________________________________
Why did Airbnb dump React Native? (2021)
Author : aabbcc1241
Score : 44 points
Date : 2022-08-16 16:35 UTC (6 hours ago)
(HTM) web link (www.theimmigrantprogrammers.com)
(TXT) w3m dump (www.theimmigrantprogrammers.com)
| hunterb123 wrote:
| Seems strange to write an article about why they switched without
| mentioning one of the main technical reasons Airbnb said
| themselves:
|
| > Many of the difficulties we encountered were due to the hybrid
| model approach we took
|
| They had about 220 screens in RN, 880 native screens total. They
| found it difficult to juggle that, essentially developing 3
| platforms instead of 2.
|
| Personally I prefer to do pure RN, with native extensions. Not a
| lot of native screens, because yes, you then are developing your
| targets plus RN.
|
| Also keep in mind they were early adopters and they probably had
| to do a lot of heavy lifting. RN has matured a lot since then,
| both thanks to Airbnb and to the rest of the community.
| meitros wrote:
| That always surprised me a bit, because part of the initial
| intent of react native was to be hybrid. Facebook had a lot of
| php developers that they wanted to enable to be able to write
| mobile screens. Not the core experiences, which you wanted
| dedicated mobile folks to write native for
| performance/transitions, but secondary things like the
| reporting flow.
|
| But it probably takes a dedicated developer focused team to
| manage hybrid. And in terms of pure react native...I don't know
| if react native is now able to feel as good as a native app,
| but even for a few years after Airbnb's post react native would
| not have been up to the task of rendering all the little
| animations and transitions that Airbnb had in their mobile app.
|
| (Though these days I would 100% write a new, less fancy mobile
| app in react native/expo - it's constantly improved throughout
| the years)
| HelloNurse wrote:
| Assimilating something native into a serviceable React Native
| component isn't particularly difficult, but reimplementing
| that component from scratch on one or two other unfamiliar
| platforms (otherwise, why are you using React Native?) might
| be expensive.
| hunterb123 wrote:
| I think it depends on how you structure your code and your
| team. RN is mixed into the Facebook apps and they do quite
| well.
|
| Generally a small team is going to do pure RN, with limited
| extensions and views. A larger team you really have to know
| how to split everyone up while still being able to bridge
| views simply.
|
| JS triggered animations and other native features are
| performant now via JSI, nowadays most people use react-
| native-reanimated to achieve this.
|
| I think most of the issues Airbnb had were growing pains of
| RN and have long been resolved.
| ram_rar wrote:
| Its a bit disingenuous of the author, who didn't even work @
| AirBnb to speculate about their tech decisions. While not citing
| AirBnBs blog (https://medium.com/airbnb-engineering/sunsetting-
| react-nativ...) on sunsetting react native.
| Apocryphon wrote:
| Airbnb switched away from React Native at a time when a lot of
| other high-profile companies did as well and wrote technical blog
| articles about it. Discord was one of the few dissenters:
|
| https://news.ycombinator.com/item?id=17619609
|
| Looks like they're doubling-down further still:
|
| https://news.ycombinator.com/item?id=32310392
|
| Looks like Shopify also picked up RN:
|
| https://news.ycombinator.com/item?id=22181873
| sandofsky wrote:
| The way Discord tamed React Native was writing its chat view
| entirely native. This is the area in which users probably spend
| 99% of their time. Similarly, in the Facebook and Instagram
| apps, React Native is banned from the home timelines and other
| areas where performance matters.
|
| Recently Discord finally ported their Android app over. Even if
| you separate the "change is bad" factor, many users report it's
| quite laggy and a major regression from their previous native
| version.
|
| I find it funny when people cite high profile companies as
| success stories without having a benchmark for failure. "The
| users didn't abandon the product in droves" is a very low bar
| when you have externalities that would prevent them from
| leaving even if they wanted to. You could find the Amazon app
| total garbage, but just how bad does it have to be to pass on
| free two day shipping?
| googlryas wrote:
| I sometimes wonder if all these independent companies who
| appear to make coordinated technical decisions are just hitting
| the same frustrations at the same time, or if engineers just
| read each other's blogs and and then pitch the blog ideas at
| their meetings. And then write a blog about it, which other
| engineers at other companies read and pitch at their meeting.
| So basically it becomes a self-perpetuating meme.
| yellow_lead wrote:
| Most companies tend to have some development "thought
| leaders" that propose big shifts like this (and use some
| politicking to advocate their views), and sometimes the "big
| thing" ends up working, and sometimes it ends up being a
| disaster.
| ClumsyPilot wrote:
| I thought I was going to be an egnineer, and my decisions
| would be based on physics.
|
| But I am more of a writer and decisions are driven by fashion
| Apocryphon wrote:
| The intersection of technology and liberal arts, baby
| dspillett wrote:
| _> So basically it becomes a self-perpetuating meme._
|
| Sometimes many people in different places have had concerns,
| or ideas for a better way forward, for some time but have
| either but spoken up or have had the "everyone else seems to
| be dealing with it" reaction.
|
| In such cases it takes a certain critical mass of information
| supporting the change to get movement, that critical mass
| builds slowly but once it is reached the immediate reaction
| can appear explosive, and there are sometimes aftershocks
| back & forth, much like an earthquake caused by plate
| movement.
|
| So while there is some self fulfilling chain reaction feeding
| into it, there is usually some true need involved for a lot
| of the teams concerned.
| danielrhodes wrote:
| Made a relatively complex React Native app last year, and gained
| a lot of perspective on it.
|
| I don't think Airbnb made a bad choice at the time they did it.
| They tried embracing a technology that was at the time half
| baked. When you are operating at the scale of Airbnb where there
| are lots of engineering hurdles and a high quality bar, it's
| challenging to absorb nascent tech.
|
| Since then a couple things have happened:
|
| - Devices have gotten much faster and this has covered up a nice
| chunk of the performance tax that existed previously
|
| - The framework has gotten more mature and performant
|
| Having said that, there are still a number of rough patches so it
| really depends on what you need. Shopify, for example, seems to
| be quite happy with it. But as usual, it depends on what you're
| making. If you want something with heavy animations, lots of
| gestures / high touch responsiveness, really fast startup time,
| etc. - RN might not be the best choice (but still way better than
| it was before because of lots of great work). If you're creating
| something that is more on the CRUD side, RN is more than suitable
| and a great choice.
| [deleted]
| geuis wrote:
| Right near the beginning:
|
| > Till the year 2012, Airbnb was just a React website.
|
| React wasn't released until 2013.
| godot wrote:
| First thing I noticed as well! I think nowadays younger
| developers mostly simply equate "web frontend" with "React"
| subconsciously. :)
| hunterb123 wrote:
| Was the same way in the jQuery days with equating it to
| JavaScript.
|
| It's a compliment to the tech of how useful and prevalent it
| is.
| dakial1 wrote:
| Poor things, they missed the glorious Macromedia Flash
| days...
| frank_nitti wrote:
| I do miss the games from shockwave.com in its heyday
| _greim_ wrote:
| I don't think even young devs think this way. More likely the
| writer is just being lazy, and filled in gaps in their own
| knowledge with faux history-salad.
| jonny_eh wrote:
| Or they meant a different year, like 2015, when React-
| Native was released.
| sandofsky wrote:
| It looks like the author has zero connection to AirBnB and is
| entirely speculating on what went down based on what the company
| themselves wrote. You're much better off just reading AirBnB's
| own long, detailed series on what happened:
| https://medium.com/airbnb-engineering/sunsetting-react-nativ...
|
| That said, I find it perfectly represents about 90% of React
| Native evangelism: someone who has never shipped an app copying
| and pasting talking points to shill their YouTube channel.
| labrador wrote:
| YouTube is in danger of becoming the video site of last resort
| if they keep allowing SEO engineers to drive good content down
| and instead drive garbage to the top
|
| Also, I got my first DMCA takedown the other day. They said I'm
| allowed 3 before they delete my site. All my videos passed the
| copyright check when I uploaded them so I relied on that as
| fair use. It occurred to me that my site will inevitably be
| taken down if 3 is the limit so I've lost all motivation to use
| it for anything.
| TakeBlaster16 wrote:
| I'm sure you've thought about this already, but you might
| want to `yt-dlp` your videos now if you care about preserving
| them.
| azangru wrote:
| Where would you host them?
| ajkjk wrote:
| Weird title. The correct English would be "Why did Airbnb dump
| React Native?". All of the sub-headings have this strange
| construction as well. Is this 'correct' in some other country and
| I'm just not aware of it?
|
| I was gonna say, it's also weird because the text of the article
| seems nearly-native quality.. but actually when I went back and
| looked more closely it's semi-broken English as well. I guess
| it's in big wordy paragraphs that you skim and don't notice the
| grammar of.
| drc500free wrote:
| I don't know what's even considered correct in Indian English,
| but it tracks with some of the non-standard word ordering I see
| working with folks from the subcontinent.
| acchow wrote:
| Merriam-Webster shows plenty of examples of usage at the top
|
| https://www.merriam-webster.com/dictionary/dump
|
| "He dumped his clothes on the bed. She dumped the contents of
| her purse on the table. I dumped the old coffee down the
| drain."
| yupper32 wrote:
| Dumped as word isn't the incorrect English. The formation of
| the question is the incorrect English.
|
| Correct: He dumped his clothes on the bed.
|
| Incorrect: Why he dumped his clothes on the bed?
|
| Correct: Why did he dump his clothes on the bed?
| filoleg wrote:
| Another fix that could make the title correct is getting
| rid of the question mark. Then it just becomes a statement
| of "Why airbnb dumped RN."
| meepmorp wrote:
| Yeah, seems odd to a western native speaker because it's
| a statement not a question, despite the use of a wh-word.
| solardev wrote:
| Minor nitpick, I don't know if there really is such a thing
| as a singular "correct English", especially when you're
| comparing across cultural groups (but even within). There
| are so many variations between American English (and its
| various subgroupings), British English, Indian English,
| Singaporean English, etc.
|
| It's a widely-used living language, and one without a
| central authority (language regulator, unlike many other
| languages:
| https://en.wikipedia.org/wiki/List_of_language_regulators)
|
| So English just kinda grows and grows haphazardly. There
| are more people in India who speak English (Wikipedia
| estimates 30% of 1.38 billion, which is 400 million) than
| there are Americans or UK residents. IMO their particular
| usage isn't any more or less correct, any more than
| American English is more or less correct than British
| English.
|
| It's not a matter of being politically correct or anti-
| racist or whatever, just the observation that English has
| always been a hodgepodge of regionalisms and will continue
| to be for the foreseeable future, and by
| speakers/population alone, probably the American and
| British varieties will continue to shrink as other
| Englishes take over. Probably it's us Westerners that will
| need to adopt to the new Englishes rather than the other
| way around.
|
| Grammar prescriptivists and grade school teachers might
| disagree, but well, they are overwhelmingly in the minority
| already and will become increasingly more so.
| galaxyLogic wrote:
| Syntax affects semantics.
|
| Seeing "Why he dumped his clothes on the bed?" you can
| guess that they MEANT to say was "Why did he dump his
| clothes on the bed?"
|
| But there's a bit of uncertainty there, was that really
| what they meant to say? Or did they mean to say something
| like "Why did he dump his clothes on the bed IS MY
| QUESTION" but somehow the rest of the sentence got lost.
|
| Syntactically correct sentences have typically a much
| more precise semantics than syntactically incorrect ones.
| One could argue that incorrect syntax means the meaning
| is anybody's guess.
|
| Point is when we read or hear language we must interpret
| it by assuming what we think the speaker wants to say.
| But if syntax is incorrect that becomes much more
| difficult. Therefor correct syntax is a god-send for
| getting your point across.
|
| Think about the way browsers interpret HTML. They allow
| you to deviate from the standard somewhat. But that
| causes different browsers to produce different visible
| output. Not a good thing. Maybe the coder thinks they are
| getting their point across, but depending on the
| audience, what browser they are using, the "point" can
| get lost. Best bet is to use standard syntax.
| solardev wrote:
| I often see similar formations in casual translations from
| other languages. The blog is from "the immigrant programmers",
| so I guess that'd make sense. I am not a linguist but maybe
| this particular phenomenon is related to subject-verb inversion
| in a question sentence clause? Something like the stuff they're
| talking about on page 5 of this paper, maybe:
| https://www.researchgate.net/publication/265785678_Embedded_...
| (over my head)
|
| Like the examples they give include:
|
| > "What this is made from?"
|
| > "Who you have come to see?"
|
| > "I asked him where does he work."
|
| > "I wonder where is he."
|
| They all sound strange to me but are apparently common in some
| Englishes.
|
| There were many other giveaways in the article that you'd never
| see in everyday American English usage:
|
| "Oh yes, it happened!" (who says that)
|
| "giant Online American Vacation Rental Business" (...it's just
| a vacation rental website)
|
| "the, excessive use, of commas, everywhere"
| iib wrote:
| It may be a form of "Euro English" [1].
|
| [1] https://en.wikipedia.org/wiki/Euro_English
| cercatrova wrote:
| Looks like the author is Indian or more generally South Asian
| based on the video and profile picture, and in that English
| dialect, it's more expected to write statements as questions
| like the title rather than "Why did Airbnb dump React Native?"
| parasti wrote:
| Is it strange that it seems less wrong to me without the
| question mark?
| solardev wrote:
| No, in American (and I think British) English, it's common to
| add a word before the subject in a question. "Why Airbnb
| dumped RN" does not have to be a question. But when it is,
| American and British speakers expects an "auxiliary", I think
| it's called... from wikipedia: https://en.wikipedia.org/wiki/
| Subject%E2%80%93auxiliary_inve...
|
| "Sam enjoys the paper" is fine.
|
| "Sam enjoys the paper?" sounds weird, like you're questioning
| the sentence itself rather than asking Sam if they enjoyed
| the paper.
|
| "DOES Sam enjoy the paper?" adds an auxiliary (does) and
| makes it more natural sounding, I guess, to our ears.
| seiferteric wrote:
| I am not a front end developer, but when reading about these
| kinds of switches in front end frameworks... isn't that an
| incredible amount of work? How could it be justified? It must
| have created some really serious unsolvable problems in order to
| switch right? You would think it would be easier to improve the
| existing one instead of switching, but who knows. Either that or
| the amount of front end code really isn't as much as I imagine.
| galaxyLogic wrote:
| The front-end should be just the (user-) interface. The main
| logic is best kept on the server.
|
| In the early days of the web there was such a thing as "text-
| based browser". (Don't recall its name right now). You could
| interface with the WWW via a text-console. The point was user-
| interface shouldn't be the main thing of the application, it
| should be just a shell around it.
| frank_nitti wrote:
| Probably not "unsolvable" but I imagine not well documented and
| a million footguns to make RN work in the scenarios described
| in the article.
|
| This would entail working in a new fork of React Native to add
| implementations for the underlying Android and iOS SDKs where
| the native functionality exists. That might include language
| bindings at multiple levels, e.g. from JS to Java, and
| potentially Java to C if NDK is required (and that's just for
| android)
|
| In my experience, writing those bindings is very bug-prone and
| user-friendly documentation can be hard to come by.
|
| We wrote some Python extensions in C for a very simple
| functionality where we wanted native speed. Could definitely
| see it having been easier to just write the dang program in C,
| since you had to understand C as well as some fundamentals
| about how the Python runtime works in C along with its special
| data types and execution patterns. And if they mainly hire app
| developers and not interpreter/OS developers that could become
| entirely untenable
| blkhp19 wrote:
| Weird to see this poorly-written blog post make it to the front
| page. It misses so many details that the official blog post
| includes https://medium.com/airbnb-engineering/react-native-at-
| airbnb...
| djkivi wrote:
| Why does Airbnb host their engineering blog on Medium?
| honkdaddy wrote:
| Short answer, eyeballs. Most engineering blogs are ultimately
| just a small part of their talent pipeline.
| detaro wrote:
| This seems to mostly rephrase things from Airbnbs engineering
| blog at the time? https://medium.com/airbnb-engineering/react-
| native-at-airbnb... (part 1 of 5)
| bornfreddy wrote:
| Thank you! The linked article explains their problems with RN
| much better.
| [deleted]
| wly_cdgr wrote:
| TL;DR:
|
| * React Native caused problems for AirBnB because they needed
| more complete and efficient support for native
| geolocation/mapping features than RN provides
|
| * More generally, frameworks like RN and Flutter are a good
| choice if your app doesn't need extensive/precise/efficient
| access to native platform features and a bad choice if it does
| hunterb123 wrote:
| That's accurate to the article but not accurate to modern RN or
| even most of Airbnb's reasoning when they switched.
|
| With JSI now you can get efficient access to native platform
| features. Before you were able to bridge pretty much any native
| feature with a native view or extension, but you were
| bottlenecked by the JS bridge. Nowadays you can use JSI for
| anything intensive.
|
| As far as Airbnb, it was more they were trying to mix 80%
| native views with 20% RN views and they found they were doing
| more work than pure native. If you do mostly RN though you
| don't have that problem.
| dang wrote:
| Related:
|
| _Airbnb Is Moving Off of React Native (2018)_ -
| https://news.ycombinator.com/item?id=23558730 - June 2020 (61
| comments)
|
| _Airbnb is 'sunsetting' React Native, reinvesting all efforts
| back into native_ - https://news.ycombinator.com/item?id=17365451
| - June 2018 (20 comments)
|
| _React Native at Airbnb_ -
| https://news.ycombinator.com/item?id=17348215 - June 2018 (248
| comments)
___________________________________________________________________
(page generated 2022-08-16 23:01 UTC)