title: How do you programmatically update URL params in react-router?
body: <p><a href="https://stackoverflow.com/questions/38678804/in-react-router-how-do-you-pass-route-parameters-when-using-browser-history-pus">This answer</a> doesn't quite cover it since it appears that you have to pass a reconstructed URL into <code>pathname</code></p>
  
  <p>If I am on the child page of these routes:</p>
  
  <pre><code>  &lt;Route name="Parent" path="/parent/:parentId" component={Parent}&gt;
      &lt;Route name="Child" path="/child/:childId" component={Child}&gt;
  </code></pre>
  
  <p>how do I programmatically update the <code>:parentId</code> without having to re-construct the entire URL?</p>
  
  <p>Something along the lines of <code>history.push({ ...., params: {parentId: 'newParent'}})</code> would be ideal.</p>
  
  <p>Thanks!</p>