title: Using react-router with react portals?
body: <p>I'm implementing an app with plenty of tables that works with the react-router perfectly, reading the URL query etc.</p>
  
  <p>Now I need to put one of the tables inside a modal (I'm using <a href="https://ant.design/components/modal/" rel="nofollow noreferrer">AntUI Modal</a> component for this purpose). From this table I can change the URL query in the browser by using <code>history</code>:</p>
  
  <pre><code>import createHistory from 'history/createBrowserHistory';
  
  export const history = createHistory()
  ...
  history.push({ search: 'my search here' });
  </code></pre>
  
  <p>The problem is that the URL changes are not visible for the table inside the modal. I've tried wrapping the component in <code>withRouter</code> HOC but it did not help, so I assume that the problem is that the modal is not laying inside the <code>&lt;Router&gt;</code> component.</p>
  
  <p>Can it be easily fixed? Or maybe my whole thought process is wrong?</p>