Android Architecture Components (bagian dari Jetpack) adalah library yang membantu membangun aplikasi yang robust dan maintainable — termasuk ViewModel (state yang aware terhadap lifecycle), LiveData/StateFlow (data observable), dan Room (abstraksi database). Mereka mendukung pola arsitektur yang direkomendasikan.
ViewModel — state holder yang aware terhadap lifecycle
VIEWMODEL holds UI-related state and logic, SURVIVING configuration changes:
→ state stored in a ViewModel SURVIVES screen rotation (the activity recreates, but the
ViewModel persists) → solves the lost-state-on-rotation problem
→ separates UI logic from the Activity/Fragment (the View just observes/displays)
