title: SO Issue with react-router-dom: "Check the render method of `Header`"
body: <p>I'm getting an error with react-router-dom "/home" route fails with the error below:</p>
  
  <p>Route /home:</p>
  
  <p><a href="https://i.stack.imgur.com/XyI5x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XyI5x.png" alt="Route /home"></a></p>
  
  <p>Route "/about" works fine: </p>
  
  <p><a href="https://i.stack.imgur.com/mYmnp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mYmnp.png" alt="Route /about"></a></p>
  
  <p>Does anyone knows how to solve this problem? This is how my "index.js" file looks like:</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 { Router } from 'react-router-dom';
  import { createBrowserHistory } from 'history';
  import registerServiceWorker from './registerServiceWorker';
  
  import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
  import '../node_modules/font-awesome/css/font-awesome.min.css';
  
  import App from './components/App';
  
  const history = createBrowserHistory();
  
  ReactDOM.render(
    &lt;Router history={ history }&gt;
      &lt;App /&gt;
    &lt;/Router&gt;
  , document.getElementById('root'));
  
  registerServiceWorker();</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And this is how my "App.jsx" component's file looks like:</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 { Switch, Route, Redirect } from 'react-router-dom';
  
  import MainNav from './MainNav/MainNav';
  import Logo from './Logo/Logo';
  import Footer from './Footer/Footer';
  import Copyright from './Copyright/Copyright';
  import HomePage from './HomePage/HomePage';
  import AboutPage from './AboutPage/AboutPage';
  import Error404 from './Error404/Error404';
  
  import './App.css';
  
  class App extends Component {
    render() {
      return (
        &lt;div className="app"&gt;
          &lt;MainNav /&gt;
          &lt;Logo /&gt;
          &lt;Switch&gt;
          &lt;Route path="/home" component={ HomePage } /&gt;
            &lt;Route exact path="/about" component={ AboutPage } /&gt;
            &lt;Route exact path="/404" component={ Error404 } /&gt;
            &lt;Redirect from="/" to="/home" /&gt;
          &lt;/Switch&gt;
          &lt;Footer /&gt;
          &lt;Copyright /&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default App;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is my "HomePage.jsx":</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 Header from './Header/Header';
  import Stores from './Stores/Stores';
  import Services from './Services/Services';
  import Reviews from './Reviews/Reviews';
  import Contact from './Contact/Contact';
  
  import './HomePage.css';
  
  export default class HomePage extends Component {
    render() {
      return (
        &lt;div className="homepage"&gt;
          &lt;Header /&gt;
          &lt;Stores /&gt;
          &lt;Services /&gt;
          &lt;Reviews /&gt;
          &lt;Contact /&gt;
        &lt;/div&gt;
      )
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Already solved. Thanks!</p>