Bridge, JSI & Threads Questions with Answers

13 practice questions on Bridge, JSI & Threads (React Native) with answers and step-by-step solutions. Try 10 samples below, then practise all 13 free in the AptiNest app.

Sample questions

Question 1Easy

Where does an app's JavaScript bundle run on a device?

  1. In the device's default browser, which hosts the UI
  2. In a JS engine embedded in the app, not a WebView
  3. On a remote server that streams the screen to the phone
  4. In a WebView that the native shell displays full screen

Answer: B. In a JS engine embedded in the app, not a WebView

Explanation

The JS bundle runs in an engine such as Hermes inside the app process. The UI it describes is drawn with native views.

Step-by-step solution

  1. The bundle runs in a JS engine like Hermes inside the app.
  2. Not in a WebView or browser.

Why the other options are wrong

  • A. There is no browser.
  • C. It runs on-device.
  • D. It's not a WebView.

Tip: Engine in app.

Question 2Easy

What does JSI stand for in React Native?

  1. Java Serialized Invocation
  2. JavaScript Interface
  3. JSON Serialization Interface
  4. JavaScript Swift Integration

Answer: B. JavaScript Interface

Explanation

JSI is a C++ API that lets the JavaScript engine and native code hold references to each other and call each other directly.

Step-by-step solution

  1. JSI is the abbreviation used for the C++ interface in React Native.
  2. The letters J, S and I stand for JavaScript Interface.
  3. So JSI stands for JavaScript Interface, which is option B.

Why the other options are wrong

  • A. Java and Serialized Invocation are not what JSI stands for.
  • C. JSON and Serialization are not part of the name; JSI does not use serialization.
  • D. Swift is not part of the name.

Tip: JSI is a JavaScript Interface, a C++ API that lets JS and native code call each other.

Question 3Easy

In the legacy architecture, how did a JS call to a native module return its result?

  1. Synchronously, as the function's direct return value
  2. By writing the result into a global JavaScript variable
  3. Asynchronously, through a callback or a Promise
  4. By firing a React state update inside the calling component

Answer: C. Asynchronously, through a callback or a Promise

Explanation

Bridge calls were asynchronous, so results came back through callbacks or Promises. Synchronous returns became practical with JSI.

Step-by-step solution

  1. In the legacy architecture, bridge calls from JS to native were asynchronous.
  2. The native result came back later, through a callback or a Promise.
  3. So the result returned asynchronously, which is option C.

Why the other options are wrong

  • A. Legacy bridge calls could not return a value directly; synchronous returns came later with JSI.
  • B. Results were not written into a global variable.
  • D. A native call does not fire a React state update to return its result.

Tip: Legacy bridge calls were async; JSI made synchronous calls possible.

Question 4Easy

How did JavaScript and native code communicate in React Native's legacy architecture?

  1. Through direct synchronous function calls into shared C++ objects
  2. Through HTTP requests to a local server inside the app
  3. Through a shared SQLite database read by both sides
  4. Over an asynchronous bridge of batched, serialized messages

Answer: D. Over an asynchronous bridge of batched, serialized messages

Explanation

The legacy bridge serialised calls to JSON-like messages, batched them and delivered them asynchronously between the JS and native threads.

Step-by-step solution

  1. Legacy RN used an async bridge.
  2. Messages were serialised and batched.

Why the other options are wrong

  • A. There was no direct sync call.
  • B. No HTTP.
  • C. No SQLite.

Tip: Bridge = async batches.

Question 5Medium

What kinds of values could legacy bridge calls carry between JS and native?

  1. Any JS value, including class instances with their methods
  2. Only serializable data: strings, numbers, arrays, plain objects
  3. Only strings, so numbers had to be converted by hand
  4. Native object references that JS code could call methods on directly

Answer: B. Only serializable data: strings, numbers, arrays, plain objects

Explanation

Everything crossing the bridge was serialised, so only plain data survived. Direct object references are what JSI added.

Step-by-step solution

  1. Legacy bridge messages were serialised (JSON-like).
  2. Only plain data can be serialised.
  3. Object references and methods cannot cross.

Why the other options are wrong

  • A. Class instances with methods cannot be serialised.
  • C. Numbers, arrays and objects were also allowed.
  • D. Direct references came with JSI.

Tip: Bridge = JSON-like.

Question 6Medium

Is JSI tied to a single JavaScript engine?

  1. Yes; JSI only works with the JavaScriptCore engine on iOS
  2. Yes; JSI is simply another name for the Hermes engine itself
  3. No; it is engine-agnostic, and several engines implement it
  4. Yes; JSI requires V8 and cannot run inside Hermes at all

Answer: C. No; it is engine-agnostic, and several engines implement it

Explanation

JSI is an abstraction layer. Any engine that implements it, such as Hermes or JavaScriptCore, can be used.

Step-by-step solution

  1. JSI is an abstraction layer, not a JavaScript engine.
  2. Any engine that implements the JSI interface can be used.
  3. Hermes and JavaScriptCore both implement it, so the answer is option C.

Why the other options are wrong

  • A. JSI is not tied to JavaScriptCore on iOS; it is engine-agnostic.
  • B. JSI is an interface, not the Hermes engine itself.
  • D. JSI does not require V8, and it works with engines such as Hermes.

Tip: JSI is an interface; engines such as Hermes and JavaScriptCore implement it.

Question 7Medium

A long synchronous loop runs on the JS thread. Which still keeps running smoothly?

  1. An animation started with useNativeDriver: true
  2. onPress handlers for buttons that the user is tapping
  3. setState updates triggered by a running timer
  4. A JS-driven animation that updates values each frame

Answer: A. An animation started with useNativeDriver: true

Explanation

Native-driver animations run on the UI thread after setup, so they are unaffected by a blocked JS thread. Touch handlers, timers and JS animations all wait for the JS thread.

Step-by-step solution

  1. A long synchronous loop blocks the JavaScript thread.
  2. Animations with useNativeDriver true run on the native UI thread after they are set up.
  3. So that animation keeps running smoothly, which is option A.

Why the other options are wrong

  • B. Button presses are handled on the JS thread, so they wait while it is blocked.
  • C. Timers and state updates run on the JS thread, so they wait while it is blocked.
  • D. A JS-driven animation updates each frame on the JS thread, so it stalls.

Tip: Use useNativeDriver for opacity and transform animations so they do not depend on the JS thread.

Question 8Medium

What is the main advantage of JSI over the legacy bridge?

  1. JS code no longer needs a JavaScript engine to run on devices
  2. Native code can be written in JavaScript instead of Swift
  3. It automatically moves all JS work onto the UI thread
  4. JS calls native methods directly, with no serialization

Answer: D. JS calls native methods directly, with no serialization

Explanation

With JSI, JS holds references to host objects and invokes them directly, even synchronously. The bridge had to serialise and queue every message.

Step-by-step solution

  1. The legacy bridge serialized every message and queued it between JS and native.
  2. JSI lets JavaScript hold references to native host objects.
  3. JS can then call native methods directly, with no serialization, so the answer is option D.

Why the other options are wrong

  • A. JavaScript still needs an engine to run on devices; JSI does not remove it.
  • B. Native code is still written in Swift, Kotlin or C++, not JavaScript.
  • C. JSI does not move JS work onto the UI thread automatically.

Tip: JSI removes the message queue; JS calls native code directly.

Question 9Hard

A C++ function is exposed to JavaScript through JSI. When JS calls it, on which thread does it run?

  1. Always on the main UI thread, after a queue hop
  2. On a new background thread created for each call
  3. Synchronously on the calling JS thread
  4. On the native modules thread, after the bridge batch flushes

Answer: C. Synchronously on the calling JS thread

Explanation

A JSI call is a direct function call, so it runs on the caller's thread and returns immediately. Native code that must touch UI has to dispatch to the main thread itself.

Step-by-step solution

  1. A JSI function is a direct call from JavaScript into C++.
  2. It runs on the thread that called it, which is the JS thread.
  3. The call returns right away, so the answer is option C.

Why the other options are wrong

  • A. A JSI call does not hop to the main UI thread first.
  • B. No new thread is created for each call.
  • D. The bridge batch is not involved, because JSI calls are direct.

Tip: A JSI call runs on the caller's thread; native code that touches UI must dispatch to the main thread itself.

Question 10Hard

What is a jsi::HostObject?

  1. A JavaScript object that is serialised to JSON before it reaches native code
  2. The root React component that the app registers at startup
  3. A native view object that Fabric creates for each component
  4. A C++ object exposed to JS, whose members JS can access directly

Answer: D. A C++ object exposed to JS, whose members JS can access directly

Explanation

A HostObject lets native code present a C++ object to JavaScript. Property reads and method calls from JS go straight to C++ code.

Step-by-step solution

  1. A HostObject is a C++ object that native code exposes to JavaScript.
  2. JavaScript can read its properties and call its methods directly.
  3. So a HostObject is a C++ object exposed to JS, which is option D.

Why the other options are wrong

  • A. A HostObject is not turned into JSON; JS reaches it directly.
  • B. The root component is the app's entry point, not a HostObject.
  • C. A native view created by Fabric is a view, not a HostObject.

Tip: HostObject lets JavaScript use a C++ object without going through serialization.

Practise all 13 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all React Native topics · All topics