You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in the readme about constants, we are typically hardcoding the API URL into the application.
There are many times the app needs to run with staging, development and production environment API's and each of them may have different urls. Hard coding them in constants seems to add more logic to check the current environment and then act upon it.
With multiple schemas with their own environment variables solves the problem.
The text was updated successfully, but these errors were encountered:
Yes, it's definitely a downside to add more logic for different environment URLs.
Personally I have made good experiences with being able to dynamically change the environment even in the app (though that will introduce even more complexity, as you pointed out).
Having said that, which paragraph are you referring to?
The part about constants doesn't really recommend hardcoding the API URL, it just provides an example of how to use constants.
As mentioned in the readme about constants, we are typically hardcoding the API URL into the application.
There are many times the app needs to run with staging, development and production environment API's and each of them may have different urls. Hard coding them in constants seems to add more logic to check the current environment and then act upon it.
With multiple schemas with their own environment variables solves the problem.
The text was updated successfully, but these errors were encountered: