Global

This module contains various APIs & flags that are in JavaScript global scope.

Global.__DEV__

This is the development flag known in JavaScript as just __DEV__.

You can use it like this:

open ReactNative; let environmentText = if (Global.__DEV__) { "This is development" } else { "This is production" }

Global.hermesInternal

This is the HermesInternal value known in JavaScript as global.HermesInternal.

You can use it like this:

open ReactNative; let isHermes = () => Global.hermesInternal != None;