title: Calling React Router from vanilla JS
body: <p>I have a react single page application using React Router, and having paths defined using Link as shown below:</p>
  
  <pre><code> &lt;Link to="second" className="level-2" params={{id:item.content}} title={item.name}&gt;{item.name}&lt;br/&gt;&lt;/Link&gt;
  </code></pre>
  
  <p>This changes url from /myapp/firsturi to /myapp/seconduri</p>
  
  <p>Is it possible for me to make the same react router action using vanilla JS? I tried using history.pushState() and history.replaceState() but while the url updates correctly, the content on the page does not. I can get the same thing using window.location.href="/myapp/seconduri" but that causes a page refresh which is not what I want.</p>
  
  <p>Any idea how to go about this?</p>