Introduction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

State is a fundamental building block in Jetpack Compose. State variables are like ingredients in a recipe. They represent data that determine how your app UI looks and behaves.

Jetpack Compose relies on the state to ensure your app UI is up-to-date. When the state changes, it’s like changing the recipe slightly. You don’t throw away the entire dish when adding a bit more spice. Compose only rebuilds the parts of the UI that depend on the data that changed.

In this lesson, you’ll learn about the MutableState interface and how to use it to track the changed state and update the UI. Like keeping leftover ingredients for future batches, you’ll learn about the remember function and use it to store state (ingredients) across baking sessions (composable executions).

Dive in to learn more!

See forum comments
Download course materials from Github
Previous: Quiz: Understanding State Next: Instruction