title: React Router v4 Nested Routes with Switch
body: <p>Trying to do the following, but it's not working.</p>
  
  <pre><code>ReactDOM.render(
    &lt;Router&gt;
      &lt;div className="route-wrapper"&gt;
        &lt;Switch&gt;
          &lt;App&gt;
            &lt;Route exact path="/" component={HomePage} /&gt;
            &lt;Route path="/user" component={UserPage} /&gt;
          &lt;/App&gt;
          &lt;Route component={Err404} /&gt;
        &lt;/Switch&gt;
      &lt;/div&gt;
    &lt;/Router&gt;,
    document.getElementById('main')
  )
  </code></pre>
  
  <p>As the documentation says only Route and Redirect elements are allowed inside a Switch element. How do I get this to work without explicitly wrapping HomePage and UserPage in App or having the error page wrapped by App?</p>