What is the best way to handle the use of staging or production API root url in a React Native app?

191 views Asked by At

Say I have a staging API url and a production API url. What is the best way to setup the app to use the production API url when I want to release a build to the stores and the staging API url when I am running in debug mode and just uploading to TestFlight/Internal Beta?

I was looking at react-native-config but it seems quite daunting to configure. Would using the DEV variable be possible/practical?

Thanks in advance.

0

There are 0 answers