JSI

Also called JavaScript Interface

Updated

What is JSI in React Native?

JSI (JavaScript Interface) is a lightweight C++ API that lets JavaScript hold direct references to native objects and call them synchronously, replacing the bridge.

Hermes
The JSI referenceNative viewJavaScript engineJSI is a small C++ API between the JavaScript engine and native code. Native code exposes a HostObject and JavaScript holds a real reference to it, so a call needs no JSON and no queue, and can return a value synchronously: the pointer reads the view's width the moment the jaw closes. That is what lets Fabric read layout synchronously and TurboModules be called directly. Because JSI abstracts the engine, Hermes and JavaScriptCore plug into the same coupling.

JSI — the JavaScript Interface — is a small C++ API that lets the JavaScript engine and native code talk to each other directly. It is the foundation the whole New Architecture is built on.

Under the legacy bridge, every call was converted to a JSON string, queued, and delivered asynchronously. With JSI, native code can expose a HostObject that JavaScript holds a real reference to and invokes like an ordinary object — no serialisation, no queue, and a synchronous return value when one is wanted.

Three things this unlocks:

  • TurboModules — native modules loaded lazily and called directly.
  • Fabric — a renderer that can read layout synchronously.
  • Engine independence — JSI is an abstraction over the engine, so React Native can run on Hermes or JavaScriptCore behind the same interface.

Most app developers never write JSI by hand; they benefit from libraries built on it. See the New Architecture docs.