title: React Router with Loadable Components error
body: <p>I've created a repository with a basic example that triggers this error in case it helps:</p>
  
  <p><a href="https://github.com/amalv/loadable-components-ssr" rel="noreferrer">loadable-components-ssr</a></p>
  
  <p>I'm trying to use Loadable Components in a SSR set up with <code>react-router-dom</code> <code>4.3.1</code>, <code>loadable-component</code> <code>5.6.0</code> and <code>react-dom</code> <code>16.8.1</code></p>
  
  <p>Here is a component example to which I'm trying to apply <code>loadable-component</code>:</p>
  
  <pre><code>import React from "react";
  
  const About = () =&gt; &lt;h2&gt;About&lt;/h2&gt;;
  
  export default About;
  </code></pre>
  
  <p>This is imported in the <code>App</code> component like this:</p>
  
  <pre><code>import loadable from "@loadable/component";
  ...
  const About = loadable(() =&gt; import("./About"));
  </code></pre>
  
  <p>And passed as a prop to <code>Route</code> in the same <code>App</code> component:</p>
  
  <pre><code>&lt;Route path="/about/" component={About} /&gt;
  </code></pre>
  
  <p>But I keep getting the following warning in the Developer Tools console:</p>
  
  <blockquote>
    <p>Warning: Failed prop type: Invalid prop <code>component</code> of type <code>object</code> supplied to <code>Route</code>, expected <code>function</code></p>
  </blockquote>
  
  <p>If I use an alternative syntax as suggested in the <a href="https://stackoverflow.com/a/54667771/722983">first answer</a>:</p>
  
  <pre><code>&lt;Route path="/about/" component={props =&gt; &lt;About {...props} /&gt;} /&gt;
  </code></pre>
  
  <p>The warning disappears, but the route to <code>/about</code> still gives an error when the link is clicked:</p>
  
  <pre><code>Uncaught Error: Loading chunk About failed.
  (missing: http://localhost:3000/about/About.bundle.js)
      at HTMLScriptElement.onScriptComplete (VM1805 app.bundle.js:114)
  </code></pre>
  
  <p>I followed the <a href="https://www.smooth-code.com/open-source/loadable-components/docs/server-side-rendering/" rel="noreferrer">documentation</a> about setting up <code>loadable-components</code> in SSR, so I've set up the client, the server and also the babel plugin as indicated.</p>
  
  <p>Any idea what's wrong here?</p>