Help! ViewModel
summary
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
chapters (8)
- 0:00ViewModel intro
- 1:26ViewModel responsibilities
- 10:10UI and ViewModel boundaries
- 17:42ViewModel initialization
- 25:51UI state and logic
- 35:08Error handling in ViewModel
- 38:16Testing ViewModel benefits
- 40:22Future of ViewModel
related talks
34mArchitectures in the Compose World
28mComposing Magic with MVI and Kotlin StateFlow
40mComposing ViewModels: Breaking ViewModels into smaller self-contained UI models
29mModern Android Development using MVI architecture
40mComposing ViewModels:Breaking ViewModels into smaller self-contained UI models
29mNavigation and Dependency Injection in Compose
35mBreaking Up with Big ViewModels
38mArchitecture Agnostic UI Development
