How to Increase Start up Speed of React Native Android App using Hermes

Performance of Android apps built with react native is a bit lower when compared to the performance of iOS apps. So how to increase the performance of Android apps built with react native? The answer is by enabling Hermes.

Hermes is an open source JavaScript engine optimized for running react native Android apps. It helps to increase the start-up speed of your app and decrease your app size. It also helps to increase the efficiency of memory usage.

So, how to enable hermes in your react native project?

In order to enable hermes your react native version must be 0.60.2 or higher. Enabling it is pretty easy. All you need is to open YourProject/android/app/build.gradle file and make enableHermes key as true. By default, it would set as false.

  project.ext.react = [
      entryFile: "index.js",
      enableHermes: true  // clean and rebuild if changing
  ]

After setting enableHermes as true, run the following command to clean the build.
cd android && ./gradlew clean

After cleaning just re-run your react native project using react-native run-android command. While running you can see Engine: Hermes is shown at the right top of your app- as given in the screenshot below.

Want to know more about enabling Hermes in react native? Then read the official document here.

Similar Posts

Leave a Reply