~/talk

Building State Holders in Compose with Molecule

Talkat droidcon London 2024 · 2024-10-31..11-01· [android, component-design]
links:none on file
slides:none on file

Argues that Molecule uses the Compose runtime to build state holders (presentation logic, not UI), letting composable functions be turned into StateFlow via launchMolecule so view models shrink and become more testable. Shows a chess‑player app with two independently loading components, claims combine becomes awkward past five inputs and Molecule scales better, offers a moleculeFlow variant and flow testing with Turbine, and cites Cash App and Slack using it in production.

AI-written summary · about

  1. 0:00Introduction
  2. 1:07What is Molecule
  3. 3:39Counter with Molecule
  4. 5:42Molecule for state
  5. 6:44UI vs presentation
  6. 8:07Traditional UI issues
  7. 10:36Molecule in MVVM/MVI
  8. 11:38MVI basics
  9. 12:23MVI example with Molecule
  10. 13:48Chess app demo
  11. 14:32Traditional ViewModel
  12. 15:14List screen with Molecule
  13. 16:37Multiple streams in Molecule
  14. 18:00Details screen with Molecule
  15. 19:06Adding features with Molecule
  16. 20:10Real-world ViewModel complexity
  17. 20:52Molecule vs Flows
  18. 21:56Flows scalability issues
  19. 22:38Molecule solves ViewModel problems
  20. 23:21Optimizing recomposition
  21. 23:43Reusable state logic
  22. 25:07Testing Molecule with Turbine
  23. 25:49Molecule like protein
  24. 26:30Recap and benefits of using Molecule
~/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.