Sample questions
Rn Native Bridge ModulesDifficulty 1
In the classic ("old") React Native architecture, what is the "bridge"?
- aAn asynchronous messaging layer that serializes data to pass calls between JS and native code.✓
- bA native UI widget that renders React components directly.
- cA cache that stores AsyncStorage key-value pairs on disk.
- dA build tool that compiles JavaScript into native ARM machine code.
Explanation:The classic bridge is an asynchronous, message-based channel: JS and native sides exchange serialized (JSON) messages, batched and processed on separate threads.
Rn Native Bridge ModulesDifficulty 1
Which statement about the JS thread in React Native is correct?
- aIt is the same OS thread that draws native views to the screen.
- bIt runs your application's JavaScript logic and is separate from the native UI (main) thread.✓
- cIt only exists in debug builds and is removed in release builds.
- dIt executes Java/Kotlin code directly without any JS engine.
Explanation:React Native runs app JS on its own thread (historically called the "JS thread"), distinct from the native UI thread that handles rendering and touch input.
Rn Native Bridge ModulesDifficulty 1
What is a "native module" in React Native?
- aA piece of platform-specific (Java/Kotlin or Objective-C/Swift) code exposed to JavaScript.✓
- bA CSS-like style object applied only on iOS.
- cA third-party npm package that has no native code at all.
- dA JavaScript file bundled separately from the main app bundle.
Explanation:A native module wraps platform SDK functionality (camera, sensors, storage, etc.) written in Java/Kotlin or Objective-C/Swift and exposes it as a JS-callable API.
Rn Native Bridge ModulesDifficulty 1
Why is the classic bridge described as "asynchronous"?
- aBecause JS-to-native calls are queued and dispatched in batches, without blocking the caller for a synchronous return value.✓
- bBecause it only works when the device has an active internet connection.
- cBecause it uses WebSockets to talk to a remote debugging server.
- dBecause native modules are optional and can be loaded at any time.
Explanation:Bridge calls are enqueued as serialized messages and flushed in batches; the calling side does not block waiting for an immediate synchronous result.
Rn Native Bridge ModulesDifficulty 2
What does JSI stand for in the new React Native architecture?
- aJSON Serialization Index — a lookup table for bridge message IDs.
- bJavaScript Import — a module resolution system for native dependencies.
- cJavaScript Interface — a C++ layer for direct JS-native object references.✓
- dJava Script Isolation — a sandbox that prevents JS from calling native code.
Explanation:JSI (JavaScript Interface) is a lightweight C++ API that lets JavaScript objects hold direct references to C++ host objects/functions, removing the need for JSON serialization on every call.
Rn Native Bridge ModulesDifficulty 2
Why can JSI-based calls be synchronous, unlike classic bridge calls?
- aBecause JSI forces all native modules to run on the JS thread itself.
- bBecause JSI compresses JSON messages so they transfer instantly.
- cBecause JS holds a direct reference to a native function/object and can invoke it in-place, without message serialization.✓
- dBecause JSI disables the event loop during the call.
Explanation:With JSI, a JS object can hold a live reference to a native (C++) function and call it directly and synchronously, since no cross-thread message queue or JSON round-trip is required.