Airbnb Is Moving Off of React Native (2018)
softwareengineeringdaily.com
softwareengineeringdaily.com
I have built apps in native iOS (pre-swift), Android (Java), windows phone (c#), phonegap/Cordova/ionic capacitor (cross platform web w/ native plugins), and Xamarin.
I did a POC of the app in RN before my team started building it, and I fell in love with it. We moved to the beta with Fast Refresh and the experience of building the app was great. Expo is huge too if you don’t need custom native like we did (we’re building an order processing app for a custom Android scanner).
Overall I feel that React is the best tech for building frontends that we have so far, and TypeScript makes JS quite nice.
Downsides to RN were the entire package dependency tree getting messed up every time we upgraded (could have been our newness to the platform at play), and the first version of the app that was not built with react best practices was really slow and had a lot of bugs. We had to go through a rearchitecture once we learned how to properly use immutable state, redux, selectors, slices, etc. we use redux toolkit and redux saga, and it has full offline support with automatic resyncing when it reconnects. It is a very slick, high performance app now. I’m not sure we saved any time doing RN because of the learning curve, but now that the team is spooled on this architecture, it’s paying huge dividends as we build electron desktop apps and websites with React as well.
I view Airbnb's failure with it more of a (justified) lack of will.
They already had native apps rolled out and were tacking things on with React Native.
I feel it's best to invest in the largess of the codebase being in React Native and digging into native apis when needed
"A common misconception is that when Airbnb decided to use React Native, that they made a complete switch. This is not only not true, but to this day the React Native code represents only 15-20% of the codebase and developer resources. It was never a majority platform for the company, and part of that was the immense upfront cost to enable even the first set of components for the mobile platforms.
Even though React Native is a framework and vastly simplifies mobile development, it is not trivial to get up and running, particularly if you have an existing codebase. Expect to invest a substantial amount of time and energy to integrating React Native into your existing mobile codebase"
Airbnb decided it wasn't a priority to finish the job.
That's a fine choice I just don't see it as wholesale indictment of React Native as it was originally sold in that article.
Small company, limited resources, greenfield app that needs to be on all platforms: React Native is a no-brainer that'll help you survive and thrive.
Large company, large existing native codebase, no shortage of resources: RN will be an expensive, divisive distraction that doesn't gain you anything. It can make a lot of sense for prototype projects, but that use case is pretty similar to the former.
Given the rest of the comment, I would interpret it to mean “does the job very well.”
That would be a sufficiently high bar for most use cases.
It starts up in a couple seconds, all interactions feel instant, it syncs smoothly. Photos are quick to take, scans of barcodes happen right away. The UI re-renders whenever things change either on the server or the client app.
There is nothing about the UX that feels non-native whatsoever.
Any feedback on using it, or things you'd like to see us try adding to RTK?
I completely understand the stance to not want to replicate documentation, but I also feel that RTK's opinionated approach, and tooling that is built in, satisfy most use cases of React-Redux apps. So I do wish that RTK was given more weight than plain React-Redux and had a smoother onboarding experience.
As an example, Create React App is a similar "batteries-included", and the docs for React have a direct tutorial on how to get started with CRA in their docs, while the Redux documents just mention Redux Toolkit at a high level in the Getting Started with Redux and then link you to the tutorials, which then tell you to go back and read the Redux docs to understand the concepts.
The problem we ran into is that we read about RTK early on in learning Redux, but didn't understand the concepts enough to know how much easier RTK was to use and maintain, so we built the whole app on plain Redux, then ended up having to convert it and strip out a bunch of manual code later. I think a focus on the onboarding to RTK should be emphasized. I really can't imagine a situation where anyone would be better off not using RTK unless they were after a very small bundle size, but it's pitched a sort of an "optional" kind of thing. I'd rather you be opinionated and tell me I should really use RTK and not write stuff myself, then link me to a guide that doesn't assume I know anything about Redux and doesn't start with converting an existing Redux app, but just teaches the Redux concepts in a "clean-room" where you don't assume I know anything about Redux.
Again, I LOVE RTK and all the work you all put into it is greatly appreciated. But a slightly better educational flow on the reason I would want RTK could have saved us a month or two of dev time rebuilding everything on top of RTK at the tail end when we got familiar with Redux and realized all the issues we were creating by not using immutable updates, slices, thunks, consistent actions w/ automatic action creators, memoized selectors, integration with TypeScript, etc.
The good news is that I have been working on a new "Quick Start" tutorial for the Redux core docs [0], which is _exactly_ what you're describing there: an intro to Redux, for folks who have never used it before, which teaches RTK and the React-Redux hooks APIs as the default way to write Redux logic.
We also have an open issue to discuss reworking the RTK tutorial sequence [1], as there's agreement that the current RTK tutorials focus too much on migration, and the "Advanced" tutorial shouldn't include TS usage.
As I said in that issue thread, it's very hard to know how to split the onboarding flow and explanations between the Redux core docs and the RTK docs. RTK _does_ work best when you actually understand how plain Redux works and how to write Redux code "by hand", and can see the benefits and purpose of abstractions like `createSlice`. So, yeah, ideally everyone would go through the bottom-up Redux tutorial sequence at some point so they fully appreciate what RTK is doing for them.
On the other hand, it's true that RTK is a lot simpler to use, code-wise, and that there's less syntax to confuse people if they're getting started. Problem is, you still need to know concepts like "dispatching actions", "reducers", and "immutability", even if you're jumping straight into RTK.
So, bottom line: this new "Quick Start" tutorial covers exactly that "start Redux with RTK as the default" use case you're describing, and after that's done, my next task will be to rewrite the existing Redux core tutorial sequence. It'll still be a "bottom-up / how it all works by hand" approach, but updated to remove outdated content (like references to "Flux") and show simpler patterns (inline action type strings, "todos/todoAdded" instead of "ADD_TODO", single-file Redux "ducks" logic, etc).
I still don't have a good answer for how to handle the RTK tutorials, but I'm going to paste your feedback into that linked thread, and would appreciate any other suggestions you have in that regard.
[0] https://deploy-preview-3740--redux-docs.netlify.app/tutorial...
The product is effectively done. It was done years ago. Now you just have engineers inventing problems for the sake of creating work. Same deal with Uber, Netflix, and Facebook. Core competency was dev complete forever ago.
There is work to be done everywhere!
- Keeping the lights on
- Deprecating old and broken systems, finishing migrations
- Tweaking the product. Small optimizations can create massive windfalls at scale.
- Maintaining and updating business logic. Imagine the complexity of laws in all 50 states and abroad.
- Improving product performance so customers don't get a bad impression.
- Improving support flow so fewer supporters can get more done.
- Exporting data, doing ETLs, etc. for analysts.
- Doing greenfield development of new products and features to further growth and deepen the moat so that competitors don't encroach.
Most businesses wouldn't pay for engineers if they didn't think they needed them.
- Making a plugin for exporting After Effects to JSON (https://github.com/airbnb/lottie-web)
- Porting their open sourced animation library for iOS (https://github.com/airbnb/lottie-ios)
- Porting their open sourced animation library to a mobile framework that another company created that doesn't really have anything to do with its core business. (https://github.com/react-native-community/lottie-react-nativ...)
- Writing a 5 part blog post on why they're moving away from that technology
Look I love Lottie, but it's hilarious to me how far outside of "Facilitating short term rentals" it is. Facebook has the same thread to pull with React. I get that they're "trying to contribute to the ecosystem" but it's like an extension of the PhD for these coders.
Data quality issues, like missing tolls, intersection being different on Uber's map than in real life means that Uber is underpricing drivers, which leads to driver cancellations. It was very frustrating for me to start the whole process again mutiple times after waiting 5-10 minutes and try to haggle with the drivers all the time.
Facebook does that manually with contractors.
"It will take one year," said the Master promptly.
"But we need this system immediately or even sooner! How long will it take if I assign ten programmers to it?"
The Master Programmer frowned. "In that case, it will take two years."
"And what if I assign a hundred programmers to it?"
The Master Programmer shrugged. "Then the design will never be completed," he said.
Video delivery is hard. If you spend a month working on a basic Netflix clone showing a single clip it won't be 1/100th the performance of Netflix even if you use a CDN.
Netflix has optimizations for individual ISPs by placing content servers directly in their DCs.
Also, large organizations accumulate constant tech debt that need to be paid down. Features aren't infinitely scalable.
Even with a top-shelf CDN, you will have a non-negligible amount of customers having playback issues because of routing issues, peering disputes, congestion etc.
If delivery was easy, Akamai would not be a multi-billion dollar company. Microsoft wouldn't pay them millions, they'd just spin up some content servers themselves.
Reminds me of how people treat web developers in comparison to "real developers". I think perhaps it's just human nature to downplay the work or job of others.
I don't disagree that some places might have too many engineers, but I also think you underestimate the complexities of running a product that operates in every corner of the globe. And wants to provide a damn good experience in every corner of the globe.
So it's insane to me that you think their problems are "done" or "solved". That's how you end up falling behind and becoming an outdated business. These companies are trying to be proactive, not reactive!
> I think perhaps it's just human nature to downplay the work or job of others.
Of course it is! But as far as Netflix, and all other employers are concerned, they need to offer jobs that are either “interesting” or glamarous - otherwise there’s nothing to attract the best talent when they’re already paying top-tier Bay Area comps just to compete with Google and Facebook. (Why they don’t try to compete with PTO is beyond me - I told one recruiter I’d work for 20% less comp if they doubled their miserly 15 days PTO and they never got back to me - but that’s another story).
Now in my case, the work I do for my day-job isn’t glamorous at all: it’s just a straightforward line-of-business SaaS application. I’m not looking to change my employer at all (for reasons I won’t go into - but I do get 45 days PTO), but if I was looking I wouldn’t accept a job at a big name if it’s just to do /routine/ work. I want to be able to blog about my work and have people at least say “oh hey, that’s cool”.
I disagree that there isn't exciting work to be done at these places. I think you're just as likely to be bored at any other job, you just get paid boatloads more. Most end up running off to do their own thing since they have the financial freedom to do so after a few years.
For what it's worth, I think you'd be able to blog about your work at Netflix, Google, Facebook, etc. Plenty of their employees do so.
EDIT (you added in some PTO details): Heck I wouldn't leave if I got 45 days PTO either! Yeah, I hope companies start competing more on hrs of work. I'd gladly take a hefty pay cut to work 20 hrs a week.
There’s two types of work-blog: the kind you have on your personal website - and the kind on the company’s own blog.
Most companies prohibit what you can talk about on your own blog (rightfully so - competitive secrets, etc) but some companies like a Apple outright prohibit you talking about your work to others at all beyond generalities.
Company-run blogs, for all their casual demeanour, are still ruled by management - and one’s blog articles become their copyright unless otherwise stipulated (as it’s a work stemming from your employment). When/if the company ceases to exist - so do your articles.
I had my own blog on blogs.msdn.com when I was at Microsoft - I sometimes posted somewhat subversive articles (such as guides on how to tweak the appearance of components of Windows if you didn’t like the defaults using publicly available articles and documentation) - I was hoping it would still be online today but it seems most MSDN blogs that didn’t reach Raymond Chen-levels of popularity got axed when the “MSDN” brand was retired. Oh well...
The company already had 50-100 native engineers already productive and passionate about iOS/Android with internal tooling, large code base and support from Google and Apple (like you could contact Apple when there was a performance problem on Swift and they would sometimes come over to diagnose). Most native engineers didn't want to do React Native and most web developers didn't want to deal with native mobile both on iOS and Android. There was always some edge cases, navigation quirks or performance problems, where in order to fix it, you had to know the platform somewhat well. Most engineers are not that familiar with both iOS, Android and RN. So who would want to do it? Also just to support RN as a platform, you needed 1-2 engineers full-time just keeping it working and resolving issues with the platform (which is not that different from iOS/Android).
To get it fully adopted, you would have to basically restructure the mobile teams, recruit new people, rewrite the code base and tooling to make the switch. RN was experiment to see if teams would be more productive and make sense for the company but it didn't since the company had already invested so much native.
There is also something to be said about building a new app in RN vs trying to build an performant app that has over 10 years of functionality, runs both Guest and Host experience in the same app, is internationalized to 30 languages/locations (each city in the world has their own regulation which affect taxes, what data needs to be collected etc), is run on wide range of devices and runs hundreds A/B tests and gradual feature rollouts. It's classic "I could build X in a weekend" if you only focus on the very common surface level features.
With many frameworks or languages people often love the experience of building a new app. After maintaining the app over years with several developers, platform upgrades etc the feeling might change. I wonder what are largest, most widely used and longest running RN apps out there?
https://news.ycombinator.com/item?id=23501780
I've long been curious whether Airbnb was too early adopting or it simply made more sense for such a big company to go native (also factoring in Swift/Kotlin making native mobile dev less-bad in the meantime), from the article:
> Many of these features were built at a time where we simply did not have enough native engineers to achieve our goals.
> we’ve grown our team to more than 100 mobile engineers to enable new experiences and improve existing ones.
Or maybe React Native truly added more baggage than it's worth going cross-platform.
Cross-platform has always been sort of a pipe dream that has haunted programmers since forever, but especially since mobile browsers and non-shitty JS became a thing (Linux and MacOS/OSX are still having their perpetual moment as well).
I plan to revisit the Airbnb series regardless since I forgot most of their reasoning...
I built an app in RN in 2017 and it was a real headache actually getting anything to build. I've since built another one, far more complex than the previous one in the last few months and it's been a real surprise as how stable and dare I say, easy, it actually is.
Saying all that, I haven't attempted to upgrade from RN 0.61 to 0.62 and expect issues from this.
Now I find myself a CTO of a startup where mobile is less crucial (we're building an issue tracker to take on Jira/Trello/etc) and I don't have a big budget anymore. I need to seriously consider something like RN or Flutter.
Anyone else been in this situation where picking a cross-platform toolkit is not a matter of trend or religion but rather one of necessity? Any learnings to share?
I was a business user, with a business account and business credit card. Why am I being shown "experiences" as the default behavior?
In the end I was forced to quit due to my account being in some weird state that they STILL haven't fixed (I checked today, a year and a half later). All that happens when I log in is I see "We’re reviewing your info Someone from our team will review your account and follow up with you soon at <email>"
This is after many years of bookings and absolutely zero disputes or complaints etc. Emailing them gets me nowhere - just no response at all.
You will end up debugging issues for supporting multiple platforms via one codebase.
I like React just not for Native Mobile, nowadays stick to native Swift or Kotlin and wait for SwiftUI and Jetpack Compose to make Mobile development seamless
Dart lost to Typescript before in the javascript war, btw