Free Jetpack Compose Interview Questions
Recomposition, state, side effects, and Compose performance.
Browse all 50 questions. Sign in with a free account to reveal the detailed answers.
What actually triggers a recomposition in Jetpack Compose?
Sign in to view the detailed answer.
Why does hoisting state make a composable more reusable, and what is the standard hoisting shape?
Sign in to view the detailed answer.
What is the difference between remember and rememberSaveable, and when does each survive?
Sign in to view the detailed answer.
What are the three phases of a Compose frame, and why does the distinction matter?
Sign in to view the detailed answer.
What makes a composable function skippable versus restartable?
Sign in to view the detailed answer.
Why can an unstable parameter type prevent a composable from being skipped?
Sign in to view the detailed answer.
What is the difference between the Stable and Immutable annotations, and what contract do you promise?
Sign in to view the detailed answer.
Why does passing a lambda to a composable sometimes break skipping, and how do you fix it?
Sign in to view the detailed answer.
When does derivedStateOf actually help, and when is it pointless?
Sign in to view the detailed answer.
In a LazyColumn, what does providing a stable key per item change, and what breaks without it?
Sign in to view the detailed answer.
What is the purpose of the key composable, and how is it different from a LazyColumn item key?
Sign in to view the detailed answer.
Why is capturing a changing value inside LaunchedEffect(Unit) a bug, and what are the two correct fixes?
Sign in to view the detailed answer.
What exactly do the keys of a LaunchedEffect control?
Sign in to view the detailed answer.
How does rememberUpdatedState differ from just passing a value as a LaunchedEffect key?
Sign in to view the detailed answer.
What is DisposableEffect for, and what is the consequence of forgetting onDispose?
Sign in to view the detailed answer.
When should you use SideEffect versus LaunchedEffect?
Sign in to view the detailed answer.
What does produceState do that a LaunchedEffect plus a MutableState does not?
Sign in to view the detailed answer.
What problem does snapshotFlow solve, and what is a common misuse?
Sign in to view the detailed answer.
What is the difference between mutableStateOf holding a List and using mutableStateListOf?
Sign in to view the detailed answer.
Does Modifier order matter, and can you give a case where reordering changes behavior?
Sign in to view the detailed answer.
Why prefer passing a lambda to Modifier.offset or graphicsLayer instead of the value-taking overload?
Sign in to view the detailed answer.
What is the difference between a static and a dynamic CompositionLocal, and what is the cost of each?
Sign in to view the detailed answer.
When is CompositionLocal the right tool versus just drilling a parameter?
Sign in to view the detailed answer.
What is the difference between Modifier.composed and the Modifier.Node API, and why is the newer one preferred?
Sign in to view the detailed answer.
In a custom Layout, what are the rules around measuring children and calling place?
Sign in to view the detailed answer.
Why is SubcomposeLayout more expensive than Layout, and when is it justified?
Sign in to view the detailed answer.
How far does a recomposition propagate when a single state changes?
Sign in to view the detailed answer.
Why can reading a state high in the tree cause the whole subtree to recompose, and how do you narrow the scope?
Sign in to view the detailed answer.
What goes wrong when you use an unstable key with remember?
Sign in to view the detailed answer.
How should a ViewModel expose state to Compose, and what is the tradeoff between StateFlow and Compose State?
Sign in to view the detailed answer.
Why should you not create or remember a ViewModel with remember instead of the viewModel or hiltViewModel functions?
Sign in to view the detailed answer.
In Navigation Compose, where should screen state live, and what is hoisted versus retained?
Sign in to view the detailed answer.
How are arguments passed and typed in Navigation Compose, and why avoid passing complex objects?
Sign in to view the detailed answer.
How do you read recomposition counts to find performance problems, and what does a high count mean?
Sign in to view the detailed answer.
What do the Compose compiler metrics tell you, and how do you act on them?
Sign in to view the detailed answer.
In Compose UI tests, why do you often need waitForIdle or to control mainClock, and what does autoAdvance do?
Sign in to view the detailed answer.
How do finders like onNodeWithText work, and why is the semantics tree, not the visual tree, what tests query?
Sign in to view the detailed answer.
What is the risk of doing heavy work directly in the body of a composable, and where should it go instead?
Sign in to view the detailed answer.
Why must composable functions be free of side effects and safe to run in any order or skip entirely?
Sign in to view the detailed answer.
What is the difference between collectAsState and collectAsStateWithLifecycle, and when does it matter?
Sign in to view the detailed answer.
How does interop work when embedding a Compose UI in a View hierarchy and vice versa, and what lifecycle concern arises?
Sign in to view the detailed answer.
Why can AndroidView's update block over-run, and how do you keep it efficient?
Sign in to view the detailed answer.
What does it mean that Compose animations are state-driven, and how does this affect recomposition cost?
Sign in to view the detailed answer.
Why might a Composable that reads a MutableState still not recompose when you expect it to?
Sign in to view the detailed answer.
What is the difference between structural and referential equality policies for mutableStateOf, and when would you change it?
Sign in to view the detailed answer.
How does a custom Saver enable rememberSaveable for a non-trivial type, and what are the two directions it defines?
Sign in to view the detailed answer.
Why can a lambda captured in a remember block become stale, and how does that differ from rememberUpdatedState?
Sign in to view the detailed answer.
What is donut-hole skipping, and how does passing content lambdas enable it?
Sign in to view the detailed answer.
Why does deferring a state read into a lambda passed to a child sometimes eliminate recomposition of the parent entirely?
Sign in to view the detailed answer.
How do the snapshot system's isolation and atomicity let Compose run composition off the main thread safely?
Sign in to view the detailed answer.
Practice all Jetpack Compose questions interactively
Search and filter questions in the free Preparation Path, then sign in to reveal answers and save your progress.
More Android interview topics
- Kotlin interview questions
- Coroutines & Flow interview questions
- Android Architecture interview questions · Premium
- Android Framework interview questions · Premium
- Testing interview questions · Premium
- Dependency Injection interview questions · Premium
- Networking interview questions · Premium
- Room & Persistence interview questions · Premium
- Android System Design interview questions · Premium
- Android Tools interview questions · Premium
- Android Security interview questions · Premium
- Performance & Memory interview questions · Premium
- Background Work interview questions · Premium
- Kotlin Multiplatform interview questions · Premium
- NDK & JNI interview questions · Premium
- Sensors & Location interview questions · Premium
- CI/CD & Release interview questions · Premium
- Graphics & Animation interview questions · Premium