Interview questions in Mobile Dev, page 15

Describe the state hoisting pattern in Compose
Tests your grasp of unidirectional data flow. Explain state hoisting is moving state up to make composables stateless. This enables reusability, easier testing, and a single source of truth. A red flag is just describing the mechanics without the benefits.

Describe state hoisting in Jetpack Compose.
Tests your grasp of unidirectional data flow. Explain state hoisting is moving state up to make composables stateless. This improves reusability, testability, and creates a single source of truth. A red flag is defining it without explaining the benefits.
Axios interceptors for auth headers
Interceptors are hooks that run before requests or after responses, centralizing concerns like auth, logging, and token refresh.

When is UserDefaults right, what are its limits, and native types?
Tests if you treat UserDefaults as a small preference store, not a database. Good answers name native plist types, cite no encryption and small size limits, and name Core Data or Keychain for heavy or sensitive data. Red flag: storing images or passwords.
Explain Flutter's GestureArena and overlapping detector scenario
The arena opens on pointer down; recognizers accept or reject; the last accepted member wins.

Which side-effect handler for a one-time coroutine on composition entry?
Tests Compose side-effect API boundaries. Answer: LaunchedEffect(Unit); it runs once and auto-cancels on exit. Contrast with rememberCoroutineScope for user-triggered callbacks. Red flag: picking SideEffect or rememberCoroutineScope and missing cancellation.

Which Compose side-effect for a one-time coroutine action?
Tests if you can choose the right Compose side-effect for a one-time coroutine. A great answer names LaunchedEffect(Unit), explains it runs once and cancels on exit. A red flag is suggesting rememberCoroutineScope directly in the composable body.

Which side-effect handler for a one-time coroutine action in Compose?
This tests your understanding of Compose lifecycles and side-effect handlers. A good answer names LaunchedEffect(Unit), explaining the constant key ensures the effect runs only once. A red flag is suggesting launching coroutines on every recomposition.
Cancelling fetch with AbortController
Pass an AbortController signal to fetch and call abort() on unmount to avoid wasted work, race conditions, and state updates on gone components.

How do you persist a custom Swift struct to JSON in Documents?
Tests fluency with Codable and FileManager sandbox APIs. Good answer: conform to Codable, encode with JSONEncoder, resolve Documents directory via FileManager URLs, write Data atomically, and reverse with JSONDecoder.
How do you pass data with Navigator.push and return data with Navigator.pop?
Tests imperative navigation and async result patterns. Strong answer: push via MaterialPageRoute with constructor args; await the Future from Navigator.push; pop with Navigator.pop(context, result). Red flag: using global state instead of the Future result.

How do you display a large list efficiently in Jetpack Compose?
This tests understanding of Compose lazy versus eager layout. A strong answer names LazyColumn or LazyRow, notes visible-only composition, and contrasts Column which lays out everything upfront.

How to implement efficient large lists in Jetpack Compose?
This tests your grasp of Compose performance. Use LazyColumn to compose only visible items, unlike a Column which renders all items at once. A red flag is suggesting a scrollable Column, which has severe performance costs for large lists.

Implement an efficient list in Jetpack Compose
Tests your grasp of UI virtualization in Compose. Answer: Use LazyColumn as it only composes visible items. Contrast this with Column, which composes all items at once, causing poor performance. Mention the items DSL.
GraphQL versus REST data fetching
One endpoint, client-specified fields avoid over- and under-fetching; Apollo's useQuery returns loading, error, and data while caching results.
Why store auth tokens in Keychain, not UserDefaults?
UserDefaults is an unencrypted plist readable from backups and on jailbroken devices; use Keychain Services, which stores encrypted items with access control; save with SecItemAdd and read with…
Navigator.push vs Navigator.pushNamed in Flutter
Tests Flutter navigation patterns and scalability. A strong answer contrasts inline widget construction with centralized route tables, noting pushNamed centralizes routes but complicates type-safe data. Red flag: named routes are always better for large apps.

Difference between remember and rememberSaveable
Remember survives recompositions only; rememberSaveable uses Bundle state for config changes and process death; use for UI state after recreation.

`remember` vs. `rememberSaveable`: When and why to use each?
Tests understanding of state survival in Compose. A good answer contrasts remember (for composition) with rememberSaveable (for activity recreation/process death), explaining its use of the Bundle mechanism. A red flag is confusing the two lifecycles.

remember vs. rememberSaveable: When and Why to Use Each
Tests understanding of Compose state survival. remember is for recomposition scope. rememberSaveable survives activity recreation and process death via a Bundle, requiring custom Savers for complex types. Red flag: saying remember survives rotation.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles