Reactive App Orchestration with StateFlow
summary
Introduces StateFlow as a Coroutines-backed replacement for ConflatedBroadcastChannel and a migration target from LiveData with a few lines of code, demonstrating a working MVVM example using MutableStateFlow/StateFlow (requires an initial value, never completes upstream), explains using LifecycleScope to cancel collectors, shows unit tests with a test coroutine scope that collects emissions into a list and asserts equality, compares operators available versus LiveData, notes Compose compatibility and that ConflatedBroadcastChannel semantics are superseded by SharedFlow/StateFlow.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 1:59Flow basics and foundation
- 6:44StateFlow introduction
- 9:35StateFlow vs LiveData
- 12:44Migration guide to StateFlow
- 15:54Testing StateFlow implementation
- 17:39Q&A session
related talks
36mGo with the Flow
42mGo with the Flow
44mGoing with the Flow - Using Coroutines 1.3.x
29mKotlin State & Shared Flows in Action
36mLifecycle for Android Developers
40mCompose Without Flow: Unidirectional State with Snapshots and Coroutines
42mVISUALIZING KOTLIN FLOW IN ANDROID
24mUsing Kotlin Flow in MVVM
