Hermes Compatibility Gaps for Native Modules in React Native 0.71+
0 reputation · 30 Sept 2020, 08:21 UTC
0 reputation · 30 Sept 2020, 08:21 UTC
For a low-traffic mobile workload, the goal is to keep Hermes enabled to benefit from reduced CPU, memory, and startup overhead, while still relying on third-party native modules that were originally written against JavaScriptCore.
The uncertainty is that some modules depend on JSC-specific globals or behaviors, such as certain WebSocket implementations or cryptographic utilities, and may fail or behave differently under Hermes. No comprehensive official compatibility matrix for community packages has been published, so the risk per module is unclear.
Given this boundary, a maintainer must choose between keeping Hermes fully enabled, disabling it, or gating it per platform or per module.
Which categories of native modules are known to break under Hermes, and is there an authoritative compatibility list? Is conditional per-platform Hermes enablement a supported configuration? What is the recommended way to detect JSC-dependent modules before migrating?
There is no official, centralized compatibility matrix for Hermes with community native modules. Modules that typically break are those that depend on JavaScriptCore‑specific internals or non‑standard JavaScript behaviors.
Intl API when Hermes is built without ICU data.Function.prototype.toString output, floating‑point rounding, or garbage‑collection timing.Hermes is a build‑time flag; you can set it differently for Android and iOS but not per module.
android/gradle.properties and set hermesEnabled=true or false.Podfile and set :hermes_enabled => true (or false) then run pod install.const isHermes = () => !!global.HermesInternal;
console.log('Hermes active:', isHermes());
If a module fails, the only supported workaround is to disable Hermes for the entire platform (or fork/patch the module). Per‑module gating is not possible.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.