React Native theorytheory 0/50 · 0%
Performance · hard

39. Hermes and JS engines

Understanding what actually runs your JavaScript.

Hermes is Meta's JS engine optimized for React Native: it precompiles JS to bytecode ahead of time, improving startup time and memory footprint compared to JSC (JavaScriptCore).

// android/app/build.gradle
project.ext.react = [
  enableHermes: true
]

Hermes has historically lagged slightly behind the latest ECMAScript features and has some `Intl`/`BigInt` support caveats depending on version, which matters for crypto code using `BigInt` for wei-precision math.

Profiling with Hermes' own sampling profiler can reveal hot functions distinct from what a generic JS profiler would show, since bytecode execution differs from JIT-compiled JS.

Check your understanding

  1. 1. What does Hermes optimize for?

  2. 2. Why does BigInt support matter for crypto-focused RN apps?

  3. 3. What was the JS engine RN used before Hermes became default?