title: URL based modal in react-router V4
body: <p>I am trying to accomplish this modal:</p>
  
  <p><a href="https://i.stack.imgur.com/gEuWS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gEuWS.jpg" alt="enter image description here"></a></p>
  
  <p>I want to render my image gallery, and when clicking on an image, the popup needs to be opened.
  I want to do it with urls and not with state/store changes.
  for example: </p>
  
  <p>the link : "/gallery/popular/fhoeuwy3928" will render the gallery in the back and the popup in front.</p>
  
  <p>In react-router 3 it was simple with nested routes. How can I do it with v4?</p>
  
  <p>These are my current routes: </p>
  
  <pre><code>&lt;Route exact path='/' component={Home}/&gt;
  &lt;Route path='/gallery/:category' component={Gallery}/&gt;
  &lt;Route path='/gallery/:category/:id' component={Popup}/&gt;
  </code></pre>