title: Div anchor tag in a react component
body: <p>Apologies if this question is flooded in the internet but nothing works in my favor.</p>
  
  <p>I thought all you need to do is add the <code># + div id</code> at the end of a url which matches the div you are going to.</p>
  
  <p>I want when I got to a particular url, the view port goes to that div. For example:</p>
  
  <pre><code>www.foo.com/bar#5
  </code></pre>
  
  <p><strong>Takes me to:</strong></p>
  
  <pre><code>&lt;div id="1"&gt;&lt;/div&gt;
  &lt;div id="2"&gt;&lt;/div&gt;
  &lt;div id="3"&gt;&lt;/div&gt;
  &lt;div id="4"&gt;&lt;/div&gt;
  &lt;div id="5"&gt;
   &lt;!-- You have found me! --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have not much experience with this part of html and wonder if <a href="https://stackoverflow.com/questions/17813719/page-jump-from-div-to-an-anchor">JavaScript is involved</a>?</p>
  
  <p>Back in the days I used to use Dreamweaver and added an anchor tag was just a click of a button so never knew the actual work behind it.</p>
  
  <p>My frontend is React; using Rails 5.</p>
  
  <p>My react layout:</p>
  
  <p><a href="https://i.stack.imgur.com/QYMWp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QYMWp.png" alt="enter image description here"></a></p>