Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Integrate ViewModel state with XML Views using Coroutines and Lifecycle on Android. Use when managing state with repeatOnLifecycle or lifecycle-aware coroutines in Fragment/Activity; defer Compose state and generic Flow design to their specific skills.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-01 | ✓→✓ | = Same ✓ | -22% | 0% |
| case-02 | ✓→✓ | = Same ✓ | -13% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 86% | 0% |
| case-04 | ✓→✓ | = Same ✓ | -26% | 0% |
repeatOnLifecycle(Lifecycle.State.STARTED) to collect flows in Views.StateFlow exclusively.viewLifecycleOwner (Fragment), NOT this.Other measured skills in the registry, with their headline benchmark lift.