title: how to move one component to another component on button click in react?
body: <p>could you please tell me how to move one component to another component on button click in react ?
  I get the <code>react-router.js</code> from cdn .I don't know how to use this js ..I want to show <code>second component on button click of</code>first component` here is my code</p>
  
  <p><a href="http://codepen.io/anon/pen/jVoZjW?editors=1010" rel="nofollow noreferrer">http://codepen.io/anon/pen/jVoZjW?editors=1010</a></p>
  
  <pre><code>class Abc extends React.Component {
    handle(){
      alert('move to second component')
    }
     render (){
       return (&lt;div&gt;&lt;h1&gt;second&lt;/h1&gt;&lt;button onClick={this.handle}&gt;move to second page&lt;/button&gt;&lt;/div&gt;);
  
     }
  }
  class Pqr extends React.Component {
     render (){
       return (&lt;div&gt;&lt;h1&gt;second&lt;/h1&gt;&lt;button&gt;click&lt;/button&gt;&lt;/div&gt;)
  
     }
  }
  class Sqr extends React.Component {
     render (){
       return &lt;h1&gt;third&lt;/h1&gt;
     }
  }
  ReactDOM.render(&lt;Abc/&gt;,document.getElementById('root')); 
  </code></pre>