title: React: Error - Element type is invalid: expected a string (for built-in components)
body: <p>I've been having some trouble with this code and cant seem to fix it. I'd appreciate any help.</p>
  <p>The error:</p>
  <p>Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.</p>
  <pre><code>Check the render method of `App`.
  </code></pre>
  <p>This is my index.js code:</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 { BrowserRouter } from 'react-router-dom';
  import './index.css';
  import App from './App';
  
  
  
  ReactDOM.render((
      &lt;BrowserRouter&gt;
          &lt;App /&gt;
      &lt;/BrowserRouter&gt;
  ), document.getElementById('root'));</code></pre>
  </div>
  </div>
  </p>
  <p>And my App.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 { Route } from 'react-router-dom';
  
  import AllMeetupsPage from './pages/AllMeetups';
  import NewMeetupPage from './pages/NewMeetup';
  import FavoritesPage from './pages/Favorites';
  
  
  function App() {
    return (
      &lt;div&gt;
        &lt;Route path='/' exact&gt;
        &lt;AllMeetupsPage /&gt;
        &lt;/Route&gt;
        &lt;Route path='/new-meetup'&gt;
        &lt;NewMeetupPage /&gt;
        &lt;/Route&gt;
        &lt;Route path='/favoriters'&gt;
        &lt;FavoritesPage /&gt;
        &lt;/Route&gt;
        &lt;/div&gt;
    );
  }
  
  export default App</code></pre>
  </div>
  </div>
  </p>