Summary
In this chapter, we learned how to write our first composables: Kotlin functions that have been annotated with @Composable
. Composable functions are the core building blocks of Jetpack Compose-based UIs. You combined existing library composables with your own to create beautiful app screens. To see a preview, we can add the @Preview
annotation. To use Jetpack Compose in a project, both build.gradle
files must be configured accordingly.
In Chapter 2, Understanding the Declarative Paradigm, we will take a closer look at the differences between the declarative approach of Jetpack Compose and the imperative nature of traditional UI frameworks such as Android's view-based component library.