AceMobileInterview

← Android track

General topic questions

ViewModel Role

EasyMost asked

Free section · general topics & algorithms

What belongs in a ViewModel vs UI layer?

Reveal model answer
UI state and business orchestration surviving rotation. No Android framework Views, no Context leaks (use Application context carefully). Expose immutable UI state flows.
← Room EntitiesRetrofit + Coroutines →