~/talk

Navigation and Dependency Injection in Compose

Talkat droidcon New York 2022 · 2022-09-01..09-02· [android]
name:Ray Ryan
links:none on file
slides:none on file

Square’s patterns map DI into Compose by turning injected presenters into composable view-model structs, using molecule runtime to expose them as StateFlow and a Jetpack ViewModel to survive config changes. Backend uses Retrofit + protobuf/Wire, Room or SQLDelight, and Dagger/Anvil for injection. Navigation is just presenter state (example: a backstack implemented with Compose Backstack), and this scales — the described codebase runs nearly 1000 screens with a few hundred engineers. The approach produces testable flows and saved view state while keeping UI customization via runtime bindings.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 3:22Problem with navigation and DI
  3. 7:15From Workflow to Molecule
  4. 10:50Handling multiple presenters
  5. 14:02Rendering UI from models
  6. 17:50Flexible UI binding strategies
  7. 20:35Navigation as app state
  8. 23:25Back stack with Compose
  9. 26:36Summary and Q&A
~/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.