Fueled Reactive apps with Asynchronous Flow and StateFlow to sync with the UI
summary
Shows step‑by‑step migration from RxJava to Kotlin coroutines, Flow and StateFlow using Retrofit/OkHttp, Room and kotlinx‑coroutines with rxinterop so Java and Kotlin coexist; deepest layers migrate first, then repos expose flows collected by scopes with scope+supervisorJob for structured cancellation; replaces callbacks with StateFlow exposes UI state and uses channelFlow with awaitClose for view events; demo app (search tweets) compiles and runs, enabling gradual removal of RxJava and fewer memory leaks.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:54Use case overview
- 2:35Migration strategy
- 5:03Legacy architecture breakdown
- 8:57Benefits of layered migration
- 10:00Flow basics explained
- 11:46Threading and lifecycle
- 14:32Gradle dependencies
- 15:14Network data source refactor
- 18:04Repository implementation
- 20:28Naive flow approach
- 22:55Pro suspend function approach
- 24:21Flow builder patterns
- 27:08Use case refactor
- 31:00View delegate design
- 35:35RxJava cleanup
- 36:17StateFlow for UI sync
- 38:22StateFlow handler
- 39:43View implementation
- 41:49Lessons learned summary
- 44:13Next steps and stability
- 45:09Q&A session
related talks
36mRx in Multiplatformland
42mGo with the Flow
43mBattle of the Titans: RxJava vs Kotlin Coroutines
36mGo with the Flow
38mAndroid Coroutines: How to manage async tasks in Kotlin
44mGoing with the Flow - Using Coroutines 1.3.x
32mUnderstanding the principles of Rx, Flow, Compose, and more, through Programming Paradigms
39mReactive Android: RxJava and beyond
