title: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined
body: <p>Im using react-router-dom V 4.0.; react-router v 4.0.0 along with webpack</p>
  
  <p>Index.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React from 'react';
  import ReactDOM from 'react-dom';
  import Nav from './component/nav';
  
  ReactDOM.render(
    &lt;Nav /&gt;,
    document.getElementById('container')
  );</code></pre>
  </div>
  </div>
  </p>
  
  <p>nav.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, {Component} from 'react';
  import { BrowserRouter as Router, Link, Match, Miss } from 'react-router-dom';
  import Home from "./home"
  
  
  const Nav = () =&gt; {
    return (
        &lt;div&gt;
         &lt;Router&gt;
           &lt;Link to='/home'&gt;Home&lt;/Link&gt;
           &lt;Match pattern='/home' component={Home}&gt; &lt;/Match&gt;
          &lt;/Router&gt;
        &lt;/div&gt;
      );
    };
  export default Nav;</code></pre>
  </div>
  </div>
  </p>
  
  <p>home.js</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React from 'react';
  
  const Home = () =&gt; {
      return (
          &lt;div&gt;
              &lt;h2&gt;Home&lt;/h2&gt;
          &lt;/div&gt;
      );
  };
  
  export default Home;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I tried using both react-router and react-router-dom but I do get the same error. Already tried the solution I found in the internet but the same error occurs. I dont really understand what causes the error.</p>
  
  <p>Edit: Error shown in browser: vendors.js%20line%20203%20%3E%20eval:36:9 </p>