title: React Js: Is importing urls from a single constants file faster than constructing them in place?
body: <p>I need to assign an href prop to a component that will have a url to a page.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;Button
    htmlId="GenerateAANotice"
    buttonStyle="secondary"
    target="_blank"
    href={`${config.BASE_URL}one/${window.dataOne}/two/${window.dataTwo}/three/four/`}
  &gt;
    My Button
  &lt;/Button&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Now, as the code above shows that the base URLs have been moved to config as it changes based on the environment. My question is:
  Suppose there are two or three places where I need to construct the same URL, then is it ok to construct the same in place as I have in the code shared?
  Or will that be a good idea to move the urls to another constants file which would be creating the urls based on the config and then we can directly import the same and use.</p>
  <p>Will there be any performance downside to this?</p>