Intermediate interview questions in React Native, page 2
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.
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.
Animated.sequence versus Animated.parallel
Sequence runs animations one after another in order, parallel starts them at the same time.
Animated API versus Reanimated architecture
Animated declares animations that the native driver runs, but logic and gestures cross the bridge; Reanimated runs worklets directly on the UI thread.
Shared values and useAnimatedStyle in Reanimated
UseSharedValue holds a mutable .value readable on both threads, useAnimatedStyle derives styles as a worklet, mutate .value with withTiming or withSpring.
Animated.event for scroll-driven parallax
Animated.event maps an event path to an Animated.Value, wire it to onScroll with useNativeDriver, then interpolate the value for header transform.
Push notification data flow with APNs and FCM
Device registers and gets a token, server sends to FCM, FCM routes to APNs for iOS and directly for Android, the OS delivers to the app.
Background GPS tracking challenges and approaches
Request always-allow permission, declare background modes, use a native background task or geofencing API rather than JS timers, manage battery and OS throttling.
Managing camera lifecycle in Vision Camera
Bind the isActive prop to screen focus via useIsFocused and to app state, so the camera stops when blurred or backgrounded.
useMemo and useCallback for stable references
UseMemo caches a computed value, useCallback caches a function identity across renders; both prevent recompute and unnecessary re-renders of memoized children.
What is Hermes and its advantages over JSC?
Hermes is an open-source engine optimized for RN, with faster startup via precompiled bytecode and lower memory use.
Which two Flipper plugins diagnose an unresponsive UI?
Use the React DevTools profiler to find expensive renders and the Performance/Hermes plugin to spot a blocked JS thread or low FPS.
What is bridge traffic and what causes dropped frames?
The bridge passes batched, serialized JSON messages between JS and native asynchronously; high-frequency events flood it.
What data types cross the bridge, and their limits?
Only JSON-serializable types cross — strings, numbers, booleans, null, arrays, maps; functions and native object handles cannot. Handle complex data via ids, base64, or JSI host objects.
What do the spec file and CodeGen do in migration?
The spec file declares the component's typed props and events; CodeGen reads it at build time to generate type-safe C++/native and JS glue, catching mismatches early.
How do you mock a fetch call in Jest tests?
Replace global fetch with a Jest mock or a library like jest-fetch-mock, return a resolved Promise with a fake Response, and reset mocks between tests.
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