Android architecture is evolving away from treating ViewModel as the universal state holder. With Jetpack Compose and Navigation 3, each type of state now has a more appropriate owner: UI state lives in composables via `remember`/`rememberSaveable`, navigation state belongs to `NavKey`, and ViewModel is increasingly a producer of presentation logic rather than a container for all mutable state. Google's official guidance now distinguishes between business logic state holders (ViewModel) and UI logic state holders (plain classes), encouraging developers to ask 'who naturally owns this state?' rather than defaulting everything to ViewModel.
Table of contents
Compose Changed the QuestionNot Every State Needs a ViewModelGoogle No Longer Treats ViewModel as the Only State HolderViewModel Is a Business Logic State HolderGet chanzmao ’s stories in your inboxNavigation 3 Completes the SeparationViewModel Is Becoming a State ProducerThe Architecture Becomes SimplerWhat About Configuration Changes and Process Death?Conclusion9.4K Impressions