Conditional modal with React Router
<p>I would like to know how to implement a route with React Router that either opens as a modal or a full page.</p>

<p>Given a list of items, when users click on an item, I would like to open a modal.
However, when users visit the item's url directly, I would like to render a full page.</p>

<p>An example of this behavior can be seen on <a href="https://producthunt.com/" rel="nofollow">https://producthunt.com/</a>.</p>

<p>When users visits a url for an item from the main page, the page is shown as a modal. However, when users go directly to the item's url, it's a full page.</p>

<p>I am doing server side rendering. Any ideas on where to begin?</p>

<h2>Edit</h2>

<p>If anyone is solving a similar problem, see this official example: <a href="https://github.com/reactjs/react-router/tree/master/examples/pinterest" rel="nofollow">https://github.com/reactjs/react-router/tree/master/examples/pinterest</a></p>