title: React.js how to register multiple routes in routes file
body: <p>I'm very new to <code>React.js</code>.</p>
  
  <p>I'm trying to build a very simple app with React router.</p>
  
  <p><a href="https://i.stack.imgur.com/EU4BF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EU4BF.png" alt="enter image description here"></a></p>
  
  <p>When some one hit the login button it should route to component <strong>Inside.js</strong></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 styles from "./welcome.css";
  import {Router,browserHistory } from 'react-router';
  class Welcome extends Component {
  
    onClick(){
      // alert("Hello World!")
      browserHistory.push('/Inside')
    }
  
    render() {
      return (
        &lt;div id="main"&gt;
          &lt;div id="welcome"&gt;
          &lt;div&gt;
          &lt;input type="text" /&gt;
          &lt;/div&gt;
          &lt;div&gt;
          &lt;input type="password" /&gt;
          &lt;/div&gt;
          &lt;div&gt;
          &lt;input type="checkbox" /&gt;Remember me
          &lt;/div&gt;
          &lt;div&gt;
          &lt;button type="button" onClick={this.onClick}&gt;Login&lt;/button&gt;
          &lt;/div&gt;
            
            
          &lt;/div&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default Welcome;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Right now I don't want to use <strong>Redux</strong> and <strong>Middle-ware</strong>  to handle the authentication. I just only need to route it to the <code>Inside.js</code> component.</p>
  
  <p>This is my <strong>Routes.js</strong> here how I define my <code>/Inside</code> router path.</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 {Route,IndexRoute} from 'react-router';
  
  import App from './components/App/App';
  import Welcome from './components/Welcome/welcome';
  import Inside from './components/Inside/inside';
  
  
  export default(
      &lt;Route path={'/'} component={App}&gt;
          &lt;IndexRoute component={Welcome}/&gt;
      &lt;/Route&gt;
      // &lt;Route path={'/Inside'} component={Inside}&gt;
      // &lt;/Route&gt;
  )</code></pre>
  </div>
  </div>
  </p>