Using environment file (.env) to configure most critical variables like database credentials, api keys, is the most common practice in software dev...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you.. This was helpful.
You are a hero man, this literally save my project. I want one day to be able to make posts this useful
Thank you. This was helpful.
@wilmela , Glad to hear that!
Danko . this was helpful.
Thanks u. U are my hero in my heart
worked perfectly
Great one Dallington 🙂
Any reason why you didn't install
react-native-dotenv
asdevDependencies
...? I'd recommend to do so.Thank you
What to do if the '@env' is not found despite following each steps?
@marcoottina, do you get this error when using typescript?
Worked fine! But error in typescript import: Cannot find module '@env' or its corresponding type
@abdulmegadraws, to resolve error in typescript import: Cannot find module '@env' or its corresponding type, create env.d.ts file in your project root directory and define module '@env' for example;
declare module '@env' {
export const API_URL: string;
export const MAJOR_VERSION: string;
export const MINOR_VERSION: string;
export const PATCH_VERSION: string;
}