Using .env in React Native projects
Add support for using .env in your project using: https://www.npmjs.com/package/react-native-config
Make sure you do the step "Extra step for Android": https://github.com/lugg/react-native-config?tab=readme-ov-file#extra-step-for-android
If on iOS it's not working, run pod install
inside ios
folder.
You can also use variables to refer to your .env variables like this:
import Config from "react-native-config";
const ENV = 'STAGE'; // 'LOCAL' or 'PROD' or 'STAGE'
export const SHOP_URL = Config[`SHOP_URL_${ENV}`];