JavaScript Runtime

Also called JS engine, JavaScript engine

Updated

What is JavaScript Runtime in React Native?

The JavaScript runtime is the engine that executes your app’s JavaScript on the device. React Native ships Hermes by default, with JavaScriptCore as the alternative.

bundle · bytecode (.hbc)engine baystartupHermes
The JavaScript bundleEngineNo Node.js on deviceReact Native embeds a JavaScript engine in the app binary; there is no browser. Hermes, built by Meta and the default since React Native 0.70, compiles your bundle to bytecode ahead of time, which cuts startup time and memory on low-end phones. JavaScriptCore, Apple's engine, parses source at launch and is still selectable. Node.js APIs such as fs and Buffer do not exist here, and engine differences are real: a regex or Intl feature that works in Chrome may be missing on device. The startup scale is illustrative.

The JavaScript runtime is the engine embedded in your app that actually runs your code on the user's phone. Unlike a web app there is no browser here — React Native bundles an engine into the binary.

Two engines matter:

  • Hermes — built by Meta specifically for React Native and the default since React Native 0.70. It compiles JavaScript to bytecode ahead of time, which cuts start-up time and memory use on low-end devices.
  • JavaScriptCore (JSC) — Apple's engine, the historical default and still selectable.

The runtime executes the JavaScript bundle that Metro produced, on the JavaScript thread.

Two consequences newcomers hit. First, Node.js APIs do not exist here — no fs, no Buffer unless polyfilled. Second, engine differences are real: a regex or Intl feature that works in Chrome may be missing in Hermes, which is why debugging in a browser can hide bugs that only appear on device.