Hermes là default từ RN 0.70 (Android) và 0.71 (iOS). Dự án mới Expo SDK 50+ và bare CLI đều bật sẵn.
Bật/tắt Hermes:
- Expo: app.json → "jsEngine": "hermes" (hoặc "jsc"). Build qua EAS.
- Bare:
- android/gradle.properties → hermesEnabled=true.
- ios/Podfile → :hermes_enabled => true. Sau đó pod install.
Đo improvement:
1. Time-to-Interactive (TTI):
import { Performance } from 'react-native'
// hoặc: const start = global.performance.now()So sánh TTI giữa Hermes vs JSC build → thường thấy giảm 30–50% trên Android low-end.
2. App size: check .apk/.ipa size. Hermes build thường nhỏ hơn 20–40% nhờ bytecode + bỏ bundle JS plain text.
3. Memory: Android Studio Profiler hoặc Xcode Instruments → so sánh peak memory. Hermes tiết kiệm 20–30%.
4. JS bundle parse time: Trace bằng RN DevTools Performance tab hoặc Systrace (Android). Hermes skip parse step hoàn toàn — bytecode load thẳng vào engine.
Khi nào tắt: chỉ khi gặp lib không tương thích (rất hiếm 2026). Đa số legacy package đã update để hỗ trợ Hermes.
Hermes is the default since RN 0.70 (Android) and 0.71 (iOS). New Expo SDK 50+ and bare CLI projects come with it on.
Enable/disable:
- Expo: app.json → "jsEngine": "hermes" (or "jsc"). Build via EAS.
- Bare:
- android/gradle.properties → hermesEnabled=true.
- ios/Podfile → :hermes_enabled => true, then pod install.
Measuring the improvement:
1. Time-to-Interactive (TTI): capture timestamps and compare Hermes vs JSC builds — typically 30–50% reduction on low-end Android.
2. App size: inspect .apk/.ipa. Hermes builds are usually 20–40% smaller thanks to bytecode and dropping plaintext JS.
3. Memory: Android Studio Profiler or Xcode Instruments — compare peak memory. Hermes saves 20–30%.
4. JS bundle parse time: trace via the RN DevTools Performance tab or Systrace (Android). Hermes skips parsing entirely — bytecode loads straight into the engine.
When to disable: only if a library is incompatible (very rare in 2026). Most legacy packages have updated for Hermes.