If I have 3 urls for an api:
http://www.xxxx.dev
http://www.xxxx.test
http://www.xxxx.prod
Is there a way in React or can React recognise the environment for api calls for example when I call:
If I am on dev it calls
fetch('http://www.xxxx.dev')
But when I am on different environments in can call the api url for that environment?