Sign in Go Pro

Android Architecture Components - A Deep Dive

ViewModel vs onSaveInstanceState

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next



ViewModels are designed to hold and manage UI-related data in a life-cycle conscious way which makes it feel like they are a replacement for onSaveInstanceState, but they are not.

In this lesson, we will look at properties of ViewModel and onSaveInstanceState to understand their use-cases and also learn how to use them in combination to save and restore UI state efficiently




There are no comments on this lesson, start the conversation below ...

You need to go PRO to post comments.

Lessons in Android Architecture Components - A Deep Dive