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. ...

Get Kickstart Modern Android Development with Jetpack and Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.