I am trying to access node environment variable from JS code of React Native, but somehow whatever I pass it is not used.
If I try something like:
NODE_ENV=test react-native run-android
I expect process.env.NODE_ENV
to be equal to test
however it is overwritten to production
or development
according to the __DEV__
param of the bundle request.
What is the suggested way of passing environment variables to JS code in React Native?
Thanks