In this article we’ll learn about Jetpack Compose, a new declarative UI framework developed by Android team.
Table of contents:-
- What is Jetpack Compose?
- Why Jetpack Compose?
- What’s next?
What is Jetpack Compose?
Jetpack Compose is the new declarative UI framework developed by the Android team at Google. It’s a modern toolkit for building native Android UI. It simplifies and accelerates UI development on Android using very less code, tools support and Kotlin APIs.
Why Jetpack Compose?
Declarative
Jetpack Compose is a declarative UI framework, what does it mean? It means that we describe the view without relying on mutation and other traditional imperative programming concepts.
Let’s consider an example of enable/disable state of a button. In traditional approach, we’ll use findViewById() to get the reference of the view and then we’ll use setEnabled() on it to enable or disable the button.