Real-World Compose Migrations: Lessons from Twitter, Airbnb, and Spotify

By Engineering Team • Published: 2025-12-14 • Updated: 2025-12-1418 min read

Case StudyMigrationEnterpriseReal World

Why Study Real Migrations?

Blog tutorials show ideal scenarios. Reality is messier. Large codebases have legacy constraints, team dynamics, and business pressures. By studying how major companies migrated to Compose, you can learn lessons that apply to your own projects.

This article compiles publicly shared data from Twitter (now X), Airbnb, Spotify, and others. All information comes from official tech blogs, conference talks, and published case studies.

Twitter/X: Incremental Migration at Scale

Twitter's Android app has over 1 million lines of Kotlin code. A full rewrite was impossible. Instead, they adopted an incremental approach that took over two years.

  • Strategy: Started with new features only, then gradually migrated existing screens
  • Key decision: Built a Design System in Compose first (Twitter UI Kit)
  • Challenge: Existing custom Views with complex accessibility requirements
  • Result: 50% of new feature code shipped in Compose by end of 2023
Note: Twitter's key insight: "Don't migrate screens, migrate components." They focused on building a comprehensive component library first.

Airbnb: Design System as Foundation

Airbnb's approach centered on their Lottie design system. Before touching product code, they rebuilt their entire design system in Compose. This took 6 months but paid dividends afterward.

// Airbnb's component abstraction pattern
// All product code uses these, not raw Compose
@Composable
fun AirbnbCard(
    title: String,
    subtitle: String,
    imageUrl: String,
    onClick: () -> Unit,
    modifier: Modifier = Modifier
) {
    // Internal implementation can change
    // without affecting product teams
}

By abstracting Compose behind their design system, Airbnb achieved: consistent UI across 20+ product teams, easy updates when Compose APIs changed, reduced onboarding time for new developers (they learn Airbnb components, not raw Compose).

Spotify: Performance-First Migration

Spotify's primary concern was performance. Music playback is sensitive to UI jank — any frame drops are immediately noticeable.

  • Benchmark requirement: New Compose screens must match or beat XML performance
  • Tool: Custom Macrobenchmark suite run on every PR
  • Discovery: Initial Compose code was 15% slower; after optimization, 10% faster
  • Key optimization: Aggressive use of derivedStateOf and remember with stable keys

Common Patterns Across Companies

Despite different approaches, successful migrations share common patterns:

  • Investment in tooling: All companies built custom lint rules, preview tools, and benchmarks
  • Design system first: Abstract Compose behind company-specific components
  • Gradual rollout: Use feature flags for A/B testing Compose vs View implementations
  • Dedicated migration team: 2-5 engineers focused full-time on infrastructure
  • Documentation culture: Internal wikis with patterns, anti-patterns, and migration guides

Measured Outcomes

Here is aggregated data from public sources:

// Industry-reported metrics (2024-2025)
{
  "code_reduction": "40-60% fewer lines for UI code",
  "development_velocity": "20-40% faster feature delivery",
  "crash_reduction": "30-50% fewer UI-related crashes",
  "build_time_impact": "5-15% increase in build times (Compose compiler)",
  "onboarding": "2-4 weeks for View developers to become productive"
}
Note: These are averages from multiple companies. Your results will vary based on codebase complexity, team experience, and migration scope.

Lessons for Your Migration

Based on these case studies, here is actionable advice:

  • Start small: Pick a low-risk screen with clear success metrics
  • Measure everything: Establish baseline performance before migrating
  • Build infrastructure: Invest in preview tooling and lint rules early
  • Train the team: Formal training reduces "Compose gotcha" bugs
  • Communicate timeline: Set realistic expectations — major migrations take 12-24 months
← Back to Blog