Dotenv in development and standalone

#1

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:

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!

0 Likes

#2

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

Gabo.

0 Likes

#3

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

#4

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

0 Likes

closed #5

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

0 Likes