Hermes - React Native's JS Engine

In the latest React Native release, the team at Meta announced that Hermes will be released bundled with React Native from now on. That is, with each new React Native release, Hermes engine will also be released.

Hermes Engine

Hermes is an open-source javascript engine optimized for React Native. It provides significant advantages like reducing app start-up time, a smaller app size, and decreased memory usage. It features ahead-of-time static optimization and compact bytecode.

Taken from Meta Engineering Blog

These are performance metrics for MatterMost React Native application running on a Google Pixel. As you can see from the above image, TTI (Time to Interaction) is reduced by 2.29s, application size by 19 MB, and memory utilization by 49 MB. These few metrics improve the performance of the application drastically and must always be considered when developing an application in React Native.

Hermes was developed at Meta to provide a better JavaScript engine for React Native mobile applications and is not integrated with any browsers.


Hermes Working

Compiling is the process of converting JavaScript code into byte code. Conventional engines compile JS code at run time, delaying the execution.

Taken from Meta Engineering Blog

Hermes, on the other hand, uses an ahead-of-time compiler that runs as a part of the mobile application build process. It creates and sends optimized, smaller bytecode for execution which reduces the start-up time.

Taken from Meta Engineering Blog

Bundled Hermes

Hermes and React Native both share the same JSI (JavaScript Interface) code. If the copies of JSI are out of sync, Hermes and React Native won’t be compatible with each other. As a result, it is required to keep track of the version of Hermes which is compatible with a specific version of React Native and vice versa.

To get rid of this confusion, the team at Meta came up with a solution of Bundled Hermes where a new Hermes will also be released with each React Native release.

Want to set up Hermes for your application? Refer this.

That’s it from this article. Stay tuned for more updates from True Sparrow.



Vinay Harwani

Vinay Harwani

Hi, I am Vinay. I am a software engineer particularly interested in mobile application and backend development.
Pune, India