Chapter 2: Handling UI State with Jetpack ViewModel
In this chapter, we will cover one of the most important libraries in Jetpack: ViewModel. In the first section, Understanding the Jetpack ViewModel, we will explore the concept and usages behind the ViewModel
architecture component. We will see what it is, why we need it in our apps, and how we can implement one in our Restaurants app, which we started in the previous chapter.
In the next section, Defining and handling state with Compose, we will study how state is managed in Compose and exemplify usages of state inside our project. Afterward, in the Hoisting state in Compose section, we will understand what state hoisting is, why we need to achieve it, and then we will apply it to our app.
Finally, in the Recovering from system-initiated process death section, we will cover what a system-initiated process death is, how it occurs, and how essential it is for our applications to be able to recover from it by restoring the previous...