Dotenv in development and standalone

Hi everyone!
I want to know how to use .env in expo app.
What things i should do to make it work properly for my app in development and production.

My project structure looks looks like this:
image

I will be fine with .env working in “native” directory but it will be cool if there is something to add in rn-cli.config.js to make this work outside like reducers, store and etc.

Thank you in advance!

Hello digitaldali,
I’m using react-native-dotenv in my project. It allows the usage of different files for dev and prod.

Gabo.

Thank you so much for this. I was into this issue and tired to tinker around to check if its possible but couldnt get it done. Now that i have seen the way you did it, thanks man
with
regards

1 Like

Ok, I will try it in my project.
It is working fine in standalone apps?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.