React Native Best Practices

Chapter 1 · Practice 3 of 5

Run on Hermes V1 and leave it on

From Project setup and upgrades

Why it matters

Hermes has been the default JavaScript engine since React Native 0.70, and Hermes V1 became the default on both iOS and Android in 0.84. The release post describes improvements to both the compiler and the virtual machine, with better execution speed and lower memory use. Apps already on Hermes get V1 automatically with no config change.

There is an opt-out, but it means forcing an older hermes-compiler package and, on Android, building React Native from source. That is a lot of cost to carry, so only use it as a short-term workaround while you report a real bug.

Because Hermes compiles your JavaScript to bytecode at build time, the way to judge its speed is a release build on a real device, not the development server.

Do

  • Keep the default engine and test performance in release builds

Avoid

  • Pinning an old Hermes compiler without a tracked issue and a plan to remove the pin