Interview questions in React Native, page 5
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.
How do Fabric, TurboModules, and JSI fix bridge limits?
JSI lets JS hold C++ host objects and call native synchronously without JSON serialization; Fabric renders concurrently and TurboModules lazy-load.
How do you move a 500ms blocking task off the JS thread?
Offload to a native module or C++ TurboModule, a worklet/worker thread, or chunk the work and yield; never block JS.
How do you debug a memory leak with Hermes heap snapshots?
Take a baseline snapshot, exercise the suspect flow repeatedly, snapshot again, and compare retained sizes and object counts that grow monotonically.
How do you send a one-off event from native to JS?
Emit an event from native using an event emitter and subscribe in JS with NativeEventEmitter, or resolve a promise/callback for a single result.
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.
Contrast the legacy bridge with JSI
Bridge is async, serialized JSON, and batched; JSI enables direct synchronous C++ calls with no serialization, cutting latency and enabling lazy native modules.
Direct events vs bubbling events in native components
Direct events fire only on the originating component; bubbling events propagate up the component tree like the DOM, allowing parent capture.
What are the three pillars of the New Architecture?
JSI for direct JS-native calls, Fabric as the new renderer, and TurboModules for lazy native modules, all unified by CodeGen for type-safe bindings.
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.
Why use a C++ TurboModule, and what are the risks?
C++ JSI bindings give synchronous, serialization-free calls and shared cross-platform code; challenges are manual memory ownership across the JS-C++ boundary, GC interaction, and thread safety.
Unit testing vs component testing in React Native
Unit tests verify isolated functions/logic with Jest; component tests render components and assert behavior with React Native Testing Library.
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.
How do you test a component using a native module?
Native code is absent in the Node-based Jest environment, so you mock the module with jest.mock to return fake values, often via the library's provided jest mock.
What does 'test behavior, not implementation' mean?
Query elements the way a user finds them (text, role, label) and assert observable behavior; for a Button, fire press and assert the visible effect, not internal state.
RNTL or Detox for a navigation flow?
RNTL can test navigation logic by rendering the navigator in JS and asserting screen changes; Detox runs the real app for true end-to-end confidence including native transitions.
What are the key challenges of setting up Detox E2E?
Maintain separate debug/release build configs, rely on Detox automatic synchronization but tame uncontrolled async like timers and animations, and stabilize CI with headless emulators and retries.
How do you catch RN performance regressions?
Track TTI, JS and UI thread FPS, and memory; baseline them and gate CI with automated tools like Flashlight, using the React profiler and DevTools to diagnose.
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