title: React scroll to anchor when opening URL in browser
body: <p>Lets say I have component "Post" which holds multiple components "Comment". I want to make that application scrolls down on comment with that anchor when I enter URL like this:</p>
  
  <pre><code>/post/:postId/#commentId
  </code></pre>
  
  <p>I have already working postId route <code>/post/:postId</code></p>
  
  <p>I tried to implement it with react-hash-link npm package but it's not working as intended. </p>
  
  <p>Every comment has it's own ID which is set on component, like this: </p>
  
  <pre><code>&lt;div class="post"&gt;
     &lt;div class="post-header"&gt;
        &lt;div class="post-header-avatar"&gt;
          SOME TEXT
        &lt;/div&gt;
        &lt;div class="post-header-info"&gt;
          SOME TEXT
        &lt;/div&gt;
     &lt;/div&gt;
     &lt;div class="post-content"&gt;
        &lt;span&gt;POST CONTENT&lt;/span&gt;
     &lt;/div&gt;
     &lt;div class="post-likers-container"&gt;
        &lt;div class="post-likers-header label"&gt;People who like this post&lt;/div&gt;
        &lt;div class="post-likers"&gt;
            SOME TEXT
        &lt;/div&gt;
     &lt;/div&gt;
     &lt;div class="post-comments"&gt;
        &lt;div class="comments "&gt;
           &lt;div class="comments-all label"&gt;Comments&lt;/div&gt;
           &lt;div class="comments"&gt;
              &lt;div class="comment" id="5d27759edd51be1858f6b6f2"&gt;
                 &lt;div class="comment-content"&gt;
                 COMMENT 1 TEXT
                 &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="comment" id="5d2775b2dd51be1858f6b720"&gt;
                 &lt;div class="comment-content"&gt;
                 COMMENT 2 TEXT
                 &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="comment" id="5d2775ecdd51be1858f6b753"&gt;
                 &lt;div class="comment-content"&gt;
                  COMMENT 3 TEXT
                 &lt;/div&gt;
              &lt;/div&gt;
           &lt;/div&gt;
        &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So for example if I open URL like:</p>
  
  <pre><code>/post/postId/#5d2775ecdd51be1858f6b753 
  </code></pre>
  
  <p>I want to open page of post and that it scrolls down to the comment with # anchor.</p>
  
  <p>Is there any way to implement this?</p>