~/talk

Help! ViewModel

TalkinJapaneseat DroidKaigi 2024 · 2024-09-11..09-13· [android, frontend-architecture]
slides:none on file

Uses Kotlin Flow streams from repositories and maps internal ViewModelState to a plain UIState that Compose renders, keeping a single-direction data flow (state down, events up). Recommends representing errors as a queued list for snackbars or as a distinct dialog UIState, splitting responsibilities via DI and smaller view models, and notes DroidKaigi’s new app replaces ViewModel with a Compose-native presenter (Circuit) to improve testability and maintainability.

AI-written summary · about

  1. 0:00ViewModel intro
  2. 1:26ViewModel responsibilities
  3. 10:10UI and ViewModel boundaries
  4. 17:42ViewModel initialization
  5. 25:51UI state and logic
  6. 35:08Error handling in ViewModel
  7. 38:16Testing ViewModel benefits
  8. 40:22Future of ViewModel
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.