What is hermes?
Hermes is an open-source JavaScript engine optimized for React Native. For many apps, enabling Hermes will result in improved start-up time (Hermes-powered apps launch faster, thanks to build-time precompilation of JavaScript into efficient bytecode.), Hermes is small in APK size, lean on memory, and starts instantly. It won't weigh your app down.
Android
project.ext.react = [
entryFile: "index.js",
- enableHermes: false // clean and rebuild if changing
+ enableHermes: true // clean and rebuild if changing
]
-keep class com.facebook.hermes.unicode.** { *; }
-keep class com.facebook.jni.** { *; }
$ cd android && ./gradlew clean
$ npx react-native run-android
iOS
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
# By default, Hermes is disabled on Old Architecture, and enabled on New Architecture.
# You can enable/disable it manually by replacing `flags[:hermes_enabled]` with `true` or `false`.
- :hermes_enabled => flags[:hermes_enabled],
+ :hermes_enabled => true
)
$ cd ios && pod install
With hermes and proguard enable
Without hermes and proguard
https://reactnative.dev/docs/hermes
https://hermesengine.dev/