Introducing Bugsnag support for Hermes, the new JavaScript engine

Duncan Hewett

Bugsnag was at Chain React 2019 recently, where React Native announced a new JavaScript engine called Hermes. It has generated a lot of interest and excitement amongst React Native developers, so let’s talk a little bit about what it is and why it matters.

If you’re unfamiliar with React Native, it is a development framework which allows developers to write code just once to build native apps for Android and iOS. Our latest State of React Native report examines global trends for apps built in React Native so be sure to check it out if you're interested in learning more about this framework.

What’s a JavaScript engine?

React Native allows developers to build rich Android and iOS apps written in JavaScript. Somehow the JavaScript code needs to be turned into a running application, and that’s where a JavaScript engine comes in.

JavaScript engines are used everywhere JavaScript code needs to be executed, from web browsers to Node.js environments. There are a few prominent JavaScript engines today: V8 is used by Chrome and Node.js, SpiderMonkey is used in Firefox, and JavaScriptCore is used in Safari.

React Native has historically used JavaScriptCore, which is available on iOS devices but not on Android devices. On Android devices, it needs to be bundled with each application.

Introducing Hermes

Hermes has been created to replace JavaScriptCore on Android. It aims to improve several key metrics for React Native apps: start up time, memory usage and APK size.

It boasts some impressive metrics, for example time to interaction (TTI), a measure of how quickly an app starts, is more than halved in some real world applications.

You can learn more about how Hermes is implemented in Facebook Engineering’s blog.

Bugsnag’s React Native error monitoring and crash reporting

Bugsnag fully supports Hermes in Bugsnag React Native v2.22.6 and above. To get started, you’ll need to enable Hermes in your React Native app. Then just upload your source maps to Bugsnag following the instructions for Hermes here

As with any major new component, it’s inevitable that Hermes will have some bugs. That’s why it’s essential to monitor your app’s stability score to gain confidence when rolling it out.

Bugsnag’s stability management platform monitors application stability and uses real-time error rates and session data to provide stability scores for each release. Automatically captured error reports surface detailed diagnostic data such as device model, OS version, thread state, breadcrumbs, and much more to help you easily reproduce and fix errors.

Companies like Zynga, Shopify and J.B. Hunt use Bugsnag for their React Native apps.

If you’re new to Bugsnag, get started with our free trial here.

Share