Byte-Sized Design

Byte-Sized Design

Share this post

Byte-Sized Design
Byte-Sized Design
🏗️ How Airbnb Rearchitected Their Frontend for a Faster, Smoother Experience

🏗️ How Airbnb Rearchitected Their Frontend for a Faster, Smoother Experience

From Rails Pages to React Routes: The Migration That Changed Everything

Byte-Sized Design's avatar
Byte-Sized Design
May 14, 2025
∙ Paid
21

Share this post

Byte-Sized Design
Byte-Sized Design
🏗️ How Airbnb Rearchitected Their Frontend for a Faster, Smoother Experience
5
Share

For years, Airbnb’s frontend ran on a familiar stack: Rails rendered the page, passed it down the wire, and React handled a few components here and there.

But that model started to break.

As the company expanded from Homes into Experiences, Places, and more, the classic “page per route” model became a drag, both for engineers and users.

So they rewrote the rules.

Today we will dive into how Airbnb took one of the busiest booking platforms in the world and rebuilt its frontend around client-side rendering, lazy loading, and API-aligned data all without breaking the experience for 100M+ daily searches.


🚨 TL;DR

Airbnb ditched its Rails-first architecture and moved to a client-side React model. They aligned every component to a standardized API shape, lazy-loaded every route, and replaced legacy helpers and presenters with canonical handoffs.

The result?

  • 5x faster route transitions

  • A mobile web experience that feels native

  • Cleaner state management, better accessibility, and smaller bundles

Airbnb reimagined how the frontend should behave.


🧭 What We’ll Cover

  1. Why Airbnb’s Rails-first model hit a wall

  2. How they aligned API data across teams

  3. Replacing global magic with predictable structure

  4. How lazy loading, async components, and dynamic routing changed everything

  5. Handling state without slowing down the UI

  6. What accessibility and responsiveness looked like in a system-level design

  7. Key lessons if you’re modernizing your own frontend


🔥 Why They Had to Rebuild

For a long time, Airbnb’s web experience relied on Rails delivering full pages. You searched, clicked a listing, and each new view was a hard navigation and a full refresh.

This worked — until it didn’t.

  • Users expected instant transitions, especially on mobile

  • Engineers wanted to compose UIs, not juggle presenters and helpers

  • New product lines needed custom routing logic, animation, and conditional UI that Rails couldn’t handle cleanly

  • Data passed into React components had no standard shape, which made moving to full React routes borderline impossible

They weren’t rebuilding just to clean up tech debt.

They were rebuilding because the product vision demanded it.


🔄 Replacing Rails-Powered Pages With Dynamic Routes

Airbnb’s search flow was rigid. You’d go from:

  1. Homepage →

  2. Search →

  3. Listing →

  4. Booking flow — with each step rendered by Rails, often with custom logic and template hacks.

But Airbnb’s designers wanted something else: a fluid exploration model, where filtering, navigating tabs, and browsing listings all felt continuous. Something closer to a native app than a web page.

To get there, Airbnb had to:

  • Split their monolithic SPA into lazy-loaded routes

  • Standardize API data across teams

  • Replace old server-side magic with predictable handoffs


🧱 Aligning the API Foundation

The first step was boring but critical: standardize the data that flows into components.

When React is server-rendered inside a Rails page, you can cheat — you just throw whatever shape of data the component needs. But when you want to render that route entirely on the client, you need a predictable API contract.

Airbnb created a “v2” API and made every team route their data through it. No exceptions.

That meant:

  • Rewriting presenters, helpers, and controller logic

  • Getting dozens of teams to stop bypassing the API “just for an experiment”

  • Re-educating everyone on why this mattered for long-term flexibility

Without this discipline, the rest of the rewrite wouldn’t work.


🧙‍♂️ Killing the Magic in Config, Experiments, and Localization

Keep reading with a 7-day free trial

Subscribe to Byte-Sized Design to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Byte-Sized Design
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share