Introduction

Jetpack Compose is the recommended UI toolkit for building Android UI. In Jetpack Compose, you use Kotlin code to specify what the UI should look like. For example, you’d use the Greetings() composable to show the ‘Hello World’ text on the screen.

@Composable
fun Greeting(modifier: Modifier = Modifier) {
  Text(
    text = "Hello World!",
    modifier = modifier
  )
}

What about when you want to send greetings to your friend? Instead of ‘Hello World,’ you’d like to show ‘Hello Bob,’ for instance, on the screen.

To modify the UI to show greetings to your friend, you update the state that’s passed as an argument to composable functions.

But what’s a state you mighty be wondering. Read on to find out.

In this lesson, you’ll:

  • Understand the purpose of the state in app development.
  • Learn how composables use state.
  • Learn how composables update UI through the process of recomposition.

Gear up! It’s time to get the party started.

See forum comments
Download course materials from Github
Next: Instruction