title: Is there a difference between a href and using an styled component with the "as" property as "a" using window.location.href
body: <p>I would like to know if there is a difference between creating an &quot;a&quot; element vs using a different element with <strong>styled components</strong> and using the property <em>as</em> set to &quot;link&quot;.</p>
  <pre><code>&lt;a href=&quot;tel:1234, 444&quot;/&gt;
  </code></pre>
  <p>vs</p>
  <pre><code>&lt;button as=&quot;link&quot; onClick=&quot;getMyNumber()&quot;/&gt;
  </code></pre>
  <p>I'm asking this because this url is a composition of a static url and another part which changes depending on the response of the API.
  So I will be returning <strong>&quot;tel: StaticNumber + randomNumber&quot;</strong></p>
  <p>Ideally I would click the button, get the secret number and attach that number to my StaticNumber and then make the call.</p>
  <p>This will only be working for mobile devices (android/ios) and as soon as the user clicks the button, they will be making a call</p>
  <p>Although I see the button element as &quot;a&quot;, thanks to styled components, I don't know if it would the same as this</p>
  <pre><code>&lt;a href=&quot;tel: 1234, 444&quot;/&gt;
  </code></pre>
  <p>Thanks</p>