Interview questions in Mobile Dev, page 30
Purpose of the guard statement
Guard requires its condition to hold or else exits the scope, and unwrapped optionals stay in scope afterward; this flattens nesting versus if.

How do include, merge, and ViewStub optimize deep layout nesting?
This tests Android view inflation and hierarchy flattening. A strong answer covers include for reuse, merge to strip redundant parents during inflation, and ViewStub for lazy-loading heavy views. A red flag is conflating them or citing XML brevity alone.

Which widget overlays and centers a loading indicator on an image?
Stack with Image first (bottom), then Center-wrapped indicator; constrain Stack to image.
Why the New Architecture Replaced the Bridge
The old bridge was async, serialized to JSON, and a single batched channel causing latency; JSI replaces it with direct synchronous C++ interop.
Closures and trailing closure syntax
Closures are self-contained function blocks that capture surrounding state; a final closure parameter can be passed as a trailing closure outside the parentheses.

Explain touch event dispatch in a ViewGroup with a clickable child
It tests touch routing through the three key methods. A strong answer traces ACTION_DOWN from root to target, notes intercepting halts child delivery, and onTouchEvent true consumes while false bubbles up.
Describe a strategy to decouple TextEditingController from global state
It tests your understanding of ephemeral versus app state in Flutter. Keep the controller local, debounce input so finalized values reach BLoC or Riverpod, and let the field own its state while editing.
How Fabric Improves Rendering Over the Old UIManager
A C++ shadow tree shared across threads, JSI-based synchronous access, immutable tree commits, and support for concurrent React features.
do-try-catch versus Optional return types
Throwing functions with do/try/catch convey why something failed via typed Error values; Optionals only say success or absence. Use throws when the caller needs the reason.

How do you diagnose and optimize a slow Room query?
Tests SQLite profiling and Room optimization. Isolate the query with Database Inspector, run EXPLAIN QUERY PLAN to spot scans, then add covering indexes, rewrite joins, or use Paging3. Red flag: blindly adding indexes or switching to NoSQL without measuring.

Describe the BLoC pattern: Events, States, and widget connection
Tests UI-business separation. Strong answers cast Events as user intents, States as immutable snapshots, and BLoC as a pure reducer. Widgets listen via BlocBuilder and dispatch via context.read. Red flag: mutating state directly or using setState inside BLoC.
CodeGen and Typed Scaffolding in the New Architecture
It reads typed JS specs and generates native interfaces at build time so JS and native agree on types, avoiding runtime checks and giving compile-time safety.
Protocols with associated types and opaque types
A PAT leaves a placeholder type unresolved, so it has no single concrete shape and historically could not be used as a bare existential; opaque types with some let you return one fixed underlying conforming…
Difference between @Path and @Query in Retrofit with example URLs
Tests Retrofit URL construction. @Path fills a path template like /users/{user}/repos with "octocat" to make /users/octocat/repos. @Query appends ?q=retrofit to /search/repos. Red flag: claiming @Query changes the path.
When to use shared_preferences and its primary limitations?
This tests whether you know appropriate local persistence tiers. A strong answer names simple primitives like flags or tokens, notes async disk writes, and warns against large blobs, relational data, or secrets.
Unit testing a custom hook with renderHook
Render the hook, read result.current, fire actions inside act, assert updated state.
IBOutlet vs IBAction in Interface Builder
Outlet references a view, action handles an event, both connect via Ctrl-drag.

OneTimeWorkRequest vs PeriodicWorkRequest and minimum repeat interval
Tests WorkManager scheduling constraints and battery tradeoffs. Contrast one-shot chaining with non-chained periodic work, cite the 15-minute minimum, and tie it to system batching under Doze and App Standby. Red flag: claiming exact intervals or no minimum.
Fix UI jank from file reads and SQLite inserts using Isolates
This tests whether you know heavy synchronous work blocks Dart's UI event loop past the 16ms frame budget. A strong answer offloads parsing and SQLite inserts to a worker isolate via compute, returning results.
Layered testing strategy for a large RN app
Many fast Jest unit tests, fewer RNTL component tests on behavior, few Detox/Maestro E2E on critical flows.
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