title: ReactJS where do I store the API URI?
body: <p>Where would I store the API URI centrally in a ReactJS Application? The URI only changes between environments and should be easily configurable (i.e. through environment variables).</p>
  
  <p>I have looked into <a href="https://www.npmjs.com/package/react-global-configuration" rel="nofollow noreferrer">this</a> package and into the new Context API, but am unsure it's the best way to achieve this. I have also looked into <a href="https://github.com/motdotla/dotenv" rel="nofollow noreferrer">dotenv</a>, but I don't like that I would have to use <code>process.env.REACT_APP_SERVICE_URI</code> in every component that wants to access the API. What is the usual approach?</p>
  
  <p>I am not using Redux.</p>