HomeGuidesReferenceLearn
ArchiveExpo SnackDiscord and ForumsNewsletter

Configure JS engines

A guide on configuring JS engines for both Android and iOS in an Expo project.


JavaScript engines execute your application code and provide various features such as memory management, optimization, and error handling. By default, Expo projects use Hermes as the JavaScript engine (in SDK 47 and lower, the default was JavaScriptCore). Switching to other engines, such as JSC or V8, for Android and iOS platforms is possible. However, not for the web because the JavaScript engine is included in the web browser.

Configuring the jsEngine through app config

We recommend Hermes because it is purpose built and optimized for React Native apps, and it has the best debugging experience. If you are familiar with the tradeoffs of different JavaScript engines and would like to change away from Hermes, the jsEngine field inside app config allows you to specify the JavaScript engine for your app. The default value is hermes.

If you want to use JSC instead, set the jsEngine field in the app config:

app.json
{
  "expo": {
    "jsEngine": "jsc"
  }
}
Are you using the bare workflow?

To change the JavaScript engine in a bare React Native project, update the expo.jsEngine value in android/gradle.properties and ios/Podfile.properties.json.

It's important to highlight that changing the JS engine will require you to recompile development builds with eas build to work properly.

Using the V8 engine

To use the V8 engine, you need to install react-native-v8, an opt-in package that adds V8 runtime support for React Native. You can install it by running the following command:

Terminal
npx expo install react-native-v8 v8-android-jit

Make sure to remove the jsEngine field from the app config.

Are you using the bare workflow?

You can run npx expo prebuild -p android --clean after the installation to prebuild again.

Switch JavaScript engine on a specific platform

To use a different engine on one specific platform, you can set the "jsEngine" value at the top level and then override it with a different value under the "android" or "ios" key. The value specified for the platform will take precedence over the common field.

app.json
{
  "expo": {
    "jsEngine": "hermes",
    "ios": {
      "jsEngine": "jsc"
    }
  }
}