Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 713 Bytes

File metadata and controls

38 lines (27 loc) · 713 Bytes
id title autoLinkToOfficialDoc
global
Global
false

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