~/talk

Hosting our states in Compose

Talkat droidcon Berlin 2021 · 2021-10-20..10-22· [android]

Explains concrete patterns: move state to a top-level host so composables stay stateless, pass values plus onValueChange lambdas, and encapsulate complex UI state in a single stakeholder object (ViewModel or data class). Shows use of remember{ } and rememberSaveable for recomposition and process restore, and demonstrates lifecycle‑safe collection of StateFlow/SharedFlow with repeatOnLifecycle / flowWithLifecycle so flows don’t leak. Includes code sketches and a working alpha library approach for safe flow collection.

AI-written summary · about

  1. 0:00Introduction
  2. 1:58State and recomposition basics
  3. 8:48Composition lifecycle explained
  4. 15:40Remember and state management
  5. 21:34State hosting in Compose
  6. 27:50Stakeholders and UI logic
  7. 31:27Flow collection safety
  8. 35:30Lifecycle-aware flow collection
  9. 41:57Best practices 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.