Jetpack Compose

Jetpack Compose is Google's declarative UI framework for Android, built around Kotlin and shipped stable in 2021. Like SwiftUI on Apple platforms, Compose lets developers describe the UI as a function of state; the runtime diffs the composition and updates only what changed.

Core ideas

  • Composable functions. A @Composable function is the building block; it can emit UI when called from another composable.
  • State and recomposition. mutableStateOf, remember, State<T>, StateFlow drive recomposition when state changes.
  • Material 3. First-class Material Design 3 components and theming.
  • Modifiers. A chained API for layout, padding, gestures, semantics, and accessibility.
  • Interop. Compose can host View widgets and vice versa, easing migration from the View system.

Beyond Android

  • Compose Multiplatform. JetBrains-maintained variant runs Compose on iOS, desktop (macOS, Windows, Linux), and web.
  • Wear OS. Compose for Wear OS targets watch form factors.
  • TV. Compose for TV is the recommended UI toolkit for Android TV.
🔗

Subscribe to Sahil's Playbook

Clear thinking on product, engineering, and building at scale. No noise. One email when there's something worth sharing.
[email protected]
Subscribe
Mastodon