~/talk

Reactive App Orchestration with StateFlow

Talkat droidcon Americas 2020 · 2020-11-16..11-17· [kotlin, reactive-programming]
links:none on file
slides:none on file

StateFlow is presented as the coroutine primitive introduced in 1.3.6 (later sitting on SharedFlow) that replace ConflatedBroadcastChannel, represents a single read-only state that never completes, and always replays the latest value to new collectors. It needs a coroutine scope to collect, migrates from LiveData by swapping observe to collect with lifecycleScope.launch, tests with TestCoroutineScope by accumulating emitted states and asserting the list, and scales O(n) with n active collectors — adoption and testing are straightforward.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 0:14What is reactive app orchestration
  3. 1:38Coroutines and Flow basics
  4. 2:45Managing UI states with coroutines
  5. 3:50Limitations of BroadcastChannel
  6. 4:54StateFlow introduction and features
  7. 6:38StateFlow vs LiveData differences
  8. 9:30Adopting StateFlow in architecture
  9. 10:55Migrating ViewModel to StateFlow
  10. 11:59Migrating View to StateFlow
  11. 12:40Testing StateFlow implementations
  12. 14:26StateFlow vs LiveData summary
  13. 15:41Q&A session begins
  14. 16:02LiveData conversion with StateFlow
  15. 17:06Will StateFlow replace LiveData
  16. 18:29StateFlow hot vs cold channel
  17. 19:52Google’s stance on StateFlow
  18. 21:21Latency in StateFlow updates
  19. 22:06StateFlow subscription behavior
  20. 23:32StateFlow emission without collectors
  21. 24:16When to migrate to StateFlow
  22. 26:06Closing StateFlow collections
  23. 27:32StateFlow emission limits
  24. 28:34Closing remarks and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.