title: React Router Error related to Link To
body: <p>I am trying to route the components from one to another, i am getting errors related to the react router link and the error for the react router is - <a href="https://i.stack.imgur.com/kqlmJ.png" rel="noreferrer">Failed to compile</a> i have tried using react router and added its package to my project library.</p>
  
  <p>here are code for the what i made for doing the route:-<br>
  1) [Index.js file][2]<br>
  2) [Navlink.js file][3]<br>
  3) [nav.js file][4]</p>
  
  <p>In Index.js i have made a router in render method but it shows errors above.<br>
  In Navlink.js i have made a link return class which provide the link and all properties.<br>
  In nav.js file i have used the navlink by import navlink.js file.
  but the errors keeps coming related to that link does'nt exist in react router and hashHistory does'nt exist in react router.</p>
  
  <p>If anyone Knows Please help.</p>
  
  <p>1)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, { Component } from 'react';
  import ReactDOM from 'react-dom';
  import { Router, Route, hashHistory } from 'react-router';
  import './index.css';
  import App from './App';
  import Homecontent from './homepage';
  import Foo from './footer';
  import registerServiceWorker from './registerServiceWorker';
  import ourAdvantages from './ouradvantage';
  import LoginForm from './loginform';
  import BoRegistration from './boregistration';
  import VoRegistration from './voregistration';
  
  ReactDOM.render(&lt;App /&gt;, document.getElementById('header'));
  registerServiceWorker();
  // ReactDOM.render(&lt;Homecontent /&gt;, document.getElementById('homecontent'));
  ReactDOM.render((
      &lt;Route path="/" component={App}&gt;
        &lt;Route path="/loginform" component={LoginForm}&gt;
        &lt;/Route&gt;
      &lt;/Route&gt;
  ), document.getElementById('homecontent'))
  //ReactDOM.render(&lt;LoginForm /&gt;, document.getElementById('loginform'));
  //ReactDOM.render(&lt;BoRegistration /&gt;, document.getElementById('boRegistration'));
  //ReactDOM.render(&lt;VoRegistration /&gt;, document.getElementById('voRegistration'));
  //ReactDOM.render(&lt;ourAdvantages /&gt;, document.getElementById('ouradvantages'));
  ReactDOM.render(&lt;Foo /&gt;, document.getElementById('footer'));</code></pre>
  </div>
  </div>
  </p>
  
  <p>2) navLink.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 { Link } from 'react-router'
  
  export default React.createClass({
    render() {
      return &lt;Link {...this.props} activeClassName="active"/&gt;
    }
  })</code></pre>
  </div>
  </div>
  </p>
  
  <p>3) 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>class NavMenu extends Component {
    render(){
      return (
        &lt;ul className="navbar-nav"&gt;
        &lt;li className="nav-item"&gt;
          &lt;navLink to="/loginform/reactjs/react-router"&gt;&lt;a className="nav-link" href="#"&gt;Home&lt;/a&gt;&lt;/navLink&gt;
        &lt;/li&gt;
        &lt;li className="nav-item"&gt;
          &lt;a className="nav-link" href="#"&gt;Our Advantages&lt;/a&gt;
        &lt;/li&gt;
        &lt;li className="nav-item"&gt;
          &lt;a className="nav-link" href="#"&gt;Offers&lt;/a&gt;
        &lt;/li&gt;</code></pre>
  </div>
  </div>
  </p>