> loading /blog/kotlin-compose-ui...
Kotlin Compose Patterns We Use in Client Apps
By First Data Team, Engineering & Product
State hoisting, navigation graphs, and offline-first screens that survive real networks.
Jetpack Compose rewards clear state boundaries. We hoist UI state to ViewModels, keep composables dumb, and test business logic without Robolectric whenever possible.
Navigation uses typed routes with argument validation at the graph level, fewer runtime crashes from deep links and push notification payloads.
Offline-first is not optional for field apps: Room as source of truth, WorkManager for sync, and explicit UI for conflict resolution when two edits collide.
Performance: avoid recompositions from unstable lambdas, use derivedStateOf for expensive transforms, and profile with Macrobenchmark before claiming smooth scroll.