Interview questions in React Native, page 3
Handling async API calls in Redux
Middleware intercepts dispatched actions, Thunk dispatches functions for simple flows, Saga uses generators for complex orchestration.
Redux versus Zustand state management
Redux uses actions, reducers, and a Provider with structured boilerplate; Zustand offers a minimal hook-based store with no provider and selective subscriptions.
Memoized selectors with Reselect
Selectors encapsulate state reads, Reselect memoizes computed results by input identity, preventing recomputation and unnecessary re-renders.
State normalization for relational data
Store entities by id in lookup tables, reference relationships by id, avoid nesting and duplication.
Offline-capable state architecture
Persist state locally, queue mutations while offline, apply optimistic updates, then sync and reconcile conflicts on reconnect.
Axios advantages over fetch
Axios auto-parses JSON, rejects on HTTP error status, and offers interceptors, timeouts, and cancellation out of the box.
Robust network error handling strategy
Classify errors as 4xx, 5xx, or connectivity; retry transient failures with backoff, surface actionable messages, and check NetInfo.
Axios interceptors for auth headers
Interceptors are hooks that run before requests or after responses, centralizing concerns like auth, logging, and token refresh.
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.
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.
Optimistic UI updates for actions
Update UI immediately on the assumption of success, send the request, then confirm or roll back on failure.
Offline data persistence and mutation queue
Persist reads to local storage, store mutations in a durable queue with client ids and status, drain and reconcile on reconnect via NetInfo.
Apollo's normalized cache
Apollo flattens query results into entities keyed by type plus id, so one object is stored once and shared, updating everywhere at once.
Platform-specific file extensions
Name files Component.ios.js and Component.android.js; import without the extension and the bundler picks the right one per platform.
Cross-platform shadow with Platform API
IOS uses shadowColor/Offset/Opacity/Radius, Android uses elevation; merge both via Platform.select inside a style.
Platform files versus Platform.OS checks
Use platform files for large divergence and platform-only deps, use Platform.OS for small inline tweaks.
Conditional logic with Platform.Version
Platform.Version is a number on Android (API level) and a string on iOS; gate features by version to use new APIs only where supported.
Designing a native map UI component
Wrap each platform's native view, expose props mapped to native setters and events as bubbling callbacks, unify behind one JS API.
Responsive layout across form factors
Drive layout from dimensions and breakpoints via useWindowDimensions, react to orientation changes, avoid hardcoded OS checks.
useNativeDriver in the Animated API
Native driver runs animations on the UI thread so they stay smooth even if JS is busy, but only supports non-layout props like transform and opacity.
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