🐦 Kotlin
Advanced
What is Jetpack Compose and how does it relate to Kotlin?
Answer
Jetpack Compose is Android's modern declarative UI framework built entirely in Kotlin. Instead of XML layouts and imperative View manipulation, you describe UI as composable functions annotated with @Composable. Compose leverages Kotlin deeply: coroutines for animations and async UI, extension functions and DSLs for layout APIs, lambdas for event handlers, and higher-order functions for customizable components. The Compose compiler plugin transforms @Composable functions at compile time, injecting a hidden Composer parameter that tracks state and enables recomposition — rebuilding only the parts of the UI whose inputs have changed.