~/talk

Managing state beyond ViewModels and Hilt

Talkat droidcon New York 2023 · 2023-09-14..09-15· [frontend-architecture, android]
links:none on file
slides:none on file

Migrates from Hilt to Anvil to enable custom scopes and stop relying on Android ViewModel lifecycles, replacing scattered coroutine scopes and init leaks with a root/user/logged-out scope system that calls onEnterScope for resource startup. Implements a ViewModelFactory via Dagger multibindings, swaps ViewModels for presenter functions using Molecule (state-as-flow), renders via renderer bindings and templates, and tests by instantiating presenters and invoking onEnterScope or a TestScope.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:13Dual-screen app architecture
  3. 2:38Problems with legacy state management
  4. 7:12Goals and design principles
  5. 8:13Migrating from Hilt to Anvil
  6. 11:46ViewModel factory with Anvil
  7. 13:33Implementing custom scopes
  8. 16:45Scope management in production
  9. 19:11Scoped interface for lifecycle
  10. 23:22Testing scoped components
  11. 24:04Recap of scope improvements
  12. 25:06Adopting unidirectional data flow
  13. 27:53Presenters and renderers
  14. 31:43Testing presenters and renderers
  15. 32:26Navigation with presenters
  16. 33:28Templates for dual-screen UI
  17. 35:33Unidirectional data flow explained
  18. 37:17Alternative libraries and summary
~/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.