You can use the __DEV__
global variable in JavaScript to determine if you’re using React Native packager or not. If you are running your app in the iOS Simulator or Android emulator __DEV__
will be set to true
.
More Related Contents:
- What is the difference between Expo and React Native?
- Setting environment variable in react-native?
- React Native version mismatch
- Module AppRegistry is not registered callable module (calling runApplication)
- React navigation goBack() and update parent state
- How to upload file to server using react-native
- React-Navigation with Login Screen
- How do I display an animated gif in React Native?
- React Native Error: ENOSPC: System limit for number of file watchers reached
- React Native TextInput that only accepts numeric characters
- ES6, how can you export an imported module in a single line?
- How to remove ‘Warning: Async Storage has been extracted from react-native core…’?
- How to make Metro (React Native packager) ignore certain directories
- Does react native support base64 encoded images?
- FlatList calls `onEndReached` when it’s rendered
- React Native – Device back button handling
- Invariant Violation: requireNativeComponent: “RNSScreen” was not found in the UIManager
- How to use global variables in React Native?
- Is React Native’s Async Storage secure?
- Pass Data between Pages in React native
- React Native Android Build Error MainActivity.java:29: error: cannot find symbol
- react native get TextInput value
- Detect ScrollView has reached the end
- Network Response Time Out Error (create-react-native-app) (expo)
- However, this package itself specifies a `main` module field that could not be resolved
- How to download a file with React Native?
- emulator-5554 unauthorized for adb devices
- React Native – React Navigation transitions
- JSON Parse error: Unrecognized token’
- Call child function from parent component in React Native