ViewModel & UI State

ARCHITECTURE › Components

How ViewModel holds UI state across config changes and exposes it safely.

ViewModel is one of the most-asked Jetpack topics because it sits at the heart of unidirectional data flow and lifecycle correctness. Interviewers probe whether you understand exactly what it survives (config changes) versus what it does not (process death), why it must never hold UI references, and how modern APIs like viewModelScope, SavedStateHandle, factories, and hiltViewModel fit together. Expect questions that test the boundary between ViewModel, SavedStateHandle, and rememberSaveable.

What this covers

Study this topic

Further reading