top of page
droidcon+icon.png
DroidCon_icon_rotatet.png

16-17 JULY 2026

ORLANDO

Anita_Singh_edited.jpg

( SPEAKER )

Mathan Raj Ponram

Mobile Arch, TikTok

( SESSION )

Fine-Grained Composable Scoping: Tying UI and Data Lifecycles at the Compilation Stage

Jetpack Compose separates UI into small parts, yet it ties ViewModel lifecycles only to Activities or Fragments. This causes data to outlive its associated UI or be reused inappropriately. We present a fine-grained scoping solution that attaches a dedicated Lifecycle and ViewModelStore to a composable level. By the use of a custom Kotlin Compiler Plugin, generate the necessary code to create and clear the scope automatically. This approach cuts boilerplate code and ensures that data is managed exactly when a composable appears or disappears, offering precise control over UI state in Compose apps.
bottom of page