title: Component not getting loaded in react routing
body: <p>Im trying to implement routing in react.
  Here's my index.js file </p>
  
  <pre><code>import React from 'react';
  import {render} from 'react-dom';
  import { BrowserRouter,Route, Switch, withRouter,Redirect } from 'react-router-dom';
  import {Home} from './components/Home.jsx';
  import {AddUser} from './components/AddUser.jsx';
  
  class App extends React.Component {
   render() {
      return(
          &lt;BrowserRouter&gt;
              &lt;Switch&gt;
                  &lt;Route path="/" exact render={() =&gt; &lt;Redirect to='/home' /&gt;} /&gt;
                  &lt;Route path="/home" exact component={Home} /&gt;
                  &lt;Route path="/adduser" exact component={AddUser} /&gt;                    
              &lt;/Switch&gt;
          &lt;/BrowserRouter&gt;
      );
   }
  }
  
  render(&lt;App/&gt;, document.getElementById('root'));
  </code></pre>
  
  <p>This my home component file </p>
  
  <pre><code>import React from 'react';
  
  export default class Home extends React.Component {
  constructor() {
      super();
      this.state = {
          users : []
      }
  }
  
    render() {
     return (
      &lt;div&gt;hello&lt;/div&gt;
     );
   }
  }
  </code></pre>
  
  <p>Application redirects as expected but the component is not getting loaded.
  There are no errors in the console, I could find various examples of react routing most of them were of previous router versions.</p>
  
  <p>Kindly help me understand this issue.
  Thanks in advance</p>