DEV Community

Muhammad Hanif
Muhammad Hanif

Posted on

React Native JS Only Environment Variable Library

Hi guys, So a few days ago I read post here about Environment Variable in React Native, the Author made me realize that an Envfile should be build/compile time only.
so I just created a library for React Native JS-only Environment variable. checkit out
https://github.com/hanipcode/rnenv

My goals

  • can be installed as dev dependency
  • JS only, no need native modules (you can use react-native-config for that)
  • suport multiple environment
  • select environment as command for example rnenv ENV=production npm run build:android

sorry for my bad english though.

Top comments (1)

Collapse
 
pinturic profile image
pinturic

Nice and easy to use solution!