Jetpack Compose là bộ công cụ UI declarative hiện đại cho phép xây dựng giao diện Android bằng Kotlin function thay vì XML.
- Nó đang thay thế XML vì code ngắn gọn hơn, type-safe, và dễ tái sử dụng hơn.
- Compose tự động cập nhật UI khi state thay đổi, loại bỏ boilerplate và giúp UI dễ test hơn.
- Google đã tuyên bố đây là cách tiếp cận được khuyến nghị cho UI Android.
Jetpack Compose is a modern declarative UI toolkit that lets you build Android UIs with Kotlin functions instead of XML.
- It's replacing XML because it's more concise, type-safe, and reusable.
- Compose automatically manages UI updates when state changes, eliminating boilerplate and making UIs easier to test and maintain.
- Google has declared it the recommended approach for Android UI development.