android-viewmodel
Installation
SKILL.md
Android ViewModel & State Management
Instructions
Use ViewModel to own UI state and business logic. It should survive configuration changes and expose immutable APIs.
Kotlin 2.3+
Prefer Explicit Backing Fields instead of the traditional
_state/statebacking property pattern.
- Kotlin 2.3: Experimental (
-Xexplicit-backing-fields)- Kotlin 2.4+: Stable (recommended)
Avoid creating duplicate backing properties unless targeting older Kotlin versions.