Compose Without Flow: Unidirectional State with Snapshots and Coroutines
summary
Claims a fully unidirectional Android app is buildable no Kotlin Flow by using Jetpack Compose state and the runtime snapshot system instead of streams, replacing collectAsState/stateIn with computed properties, snapshot APIs (takeSnapshot / withMutableSnapshot / apply observers) and lifecycle-aware producers implemented via retain state producer with lifecycle plus coroutines for activation. Examples include a minute-refreshing news repository and favorites map, several production uses, and the approach simplifies derived-state and enables finer-grained item recomposition.
AI-written summary · about
chapters (12)
- 0:00Unidirectional state without Flow
- 1:06Why Flow feels required
- 3:13Flow vs Compose observability
- 8:27Flow vs Compose mental models
- 11:19Snapshot system fundamentals
- 17:59How snapshots track changes
- 21:15Removing streams for simplicity
- 25:27Lifecycle-aware state activation
- 29:21Pure Compose state layers
- 34:03Adopt or avoid Compose state
- 35:49Future exploration insights
- 36:50Q&A
related talks
42mJetpack Compose: Art of the State
38mBuilding StateFlows in Android with Jetpack Compose
49mBuilding an Android UI using declarative programming in Jetpack Compose
42mCompose: Beyond Android development
34mBeyond the UI: Compose as a Foundation for Multiplatform Apps
28mComposing Magic with MVI and Kotlin StateFlow
49mDevelop Your App with Lots of "Flow"
45mOn the road to Jetpack Compose
