Test how well you understand what runs beneath every @Composable: the compiler, runtime, state, effects, and the UI layout system. Select all correct answers for each question. Each question is worth 10 points.
Practical questions that quietly probe Compose internals.
Jetpack Compose is commonly described as three layers: the Compose Compiler, the Compose Runtime, and the Compose UI. Which of the following statements about how these layers relate are correct?(Select all that apply)
ArchitectureQuestion 2 of 10
A regular Kotlin function cannot call a @Composable function, even when their signatures look identical. What is the underlying reason the compiler rejects the call?
CompilerQuestion 3 of 10
A composable takes a parameter of type `data class User(val name: String, val tags: List<String>)`. Which statements about its stability and recomposition skipping are correct?(Select all that apply)
CompilerQuestion 4 of 10
You wrap an expensive composable in a `Column { }` hoping `Column` will act as a recomposition boundary that isolates it from its parent's recomposition. Why does this NOT create an isolating boundary?
RuntimeQuestion 5 of 10
Compose stores remembered values and state positionally in the slot table. Which of the following are direct consequences of this positional (slot-based) identity?(Select all that apply)
RuntimeQuestion 6 of 10
A child composable reads a Boolean derived from a fast-changing scroll position. Compared with `val showButton = listState.firstVisibleItemIndex > 0`, wrapping it as `val showButton by remember { derivedStateOf { listState.firstVisibleItemIndex > 0 } }` makes the child recompose far less often, primarily because:
State & EffectsQuestion 7 of 10
Which statements about `collectAsState`, `collectAsStateWithLifecycle`, and the Android Lifecycle are correct?(Select all that apply)
State & EffectsQuestion 8 of 10
Which statements about Compose effect handlers are correct?(Select all that apply)
UI & PerformanceQuestion 9 of 10
Compare `Modifier.padding(16.dp).size(100.dp)` with `Modifier.size(100.dp).padding(16.dp)` applied to the same element. Which statement is correct?
UI & PerformanceQuestion 10 of 10
Compose UI runs three phases per frame: Composition → Layout → Drawing. Which statement about deferring state reads to later phases is correct?
Want to learn more? Check out these resources!
Jetpack Compose Mechanisms
A deep dissection of how Jetpack Compose works under the hood: compiler, runtime, and UI.