title: problem in react route rendering while the component is in index.js
body: <p>this is the most simple route in react but it does'nt work and give this Error:</p>
  <pre><code>Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
  
  
    
  &gt; 14 | render(&lt;BrowserRouter&gt;&lt;Switch&gt;&lt;Route path='/' component={Simple}/&gt;&lt;/Switch&gt;&lt;/BrowserRouter&gt;,document.getElementById('root'));
       |      ^
  </code></pre>
  <p>The code:</p>
  <pre><code>import React, { Component } from 'react';
  import { render } from 'react-dom';
  import { BrowserRouter,Switch,Route } from 'react-router-dom';
  class Simple extends Component {
      constructor(props) {
          super(props);
      }
      state = {  }
      render() { 
          return ( &lt;h1&gt;g&lt;/h1&gt; );
      }
  }
   
  render(&lt;BrowserRouter&gt;&lt;Switch&gt;&lt;Route path='/' component={Simple}/&gt;&lt;/Switch&gt;&lt;/BrowserRouter&gt;,document.getElementById('root'));
  </code></pre>