FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

rescript-react-native.github.io/docs/global.md at src · rescript-react-native/rescript-react-native.github.io · GitHub

Latest commit

 

History

History
38 lines (27 loc) · 713 Bytes

File metadata and controls

38 lines (27 loc) · 713 Bytes
id global
title Global
autoLinkToOfficialDoc 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

Back | FazBrowse Home | New Git URL