How do I know if my React Native app is running in production or development? Is there some sort of way within JavaScript to tell? Is there a global that is passed in?
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.
__DEV__
true
https://facebook.github.io/react-native/docs/javascript-environment.html
2.1m questions
2.1m answers
60 comments
57.0k users