Hey Nabil,
Thanks for you kind words!
On the React Native side (I assume you're talking about the Javascript code), you can detect what environment the app is running in using the variable we added to each .env file and the config package:
import Config from "react-native-config";
console.log(Config.ENVIRONMENT);
Now that you know what environment the app is running in, you can enable specific features and render specific components for each environment.
For example, if you wanted to enable analytics in production only, you could do something like this:
import Config from "react-native-config";
if (Config.ENVIRONMENT === 'production') {
enableAnalytics();
}
You can use this logic to render components/part of your app in specific environments only, thus enabling some functionalities in specific environments and disabling them in others.
I hope this helps!