title: how to send value one component to another component in react js?
body: <p>could you please tell me how to send input field value on second component on button click .I have one button and input field in first component.On button click I need to send input field value to second component</p>
  
  <p>here is my code
  <a href="http://codepen.io/naveennsit/pen/GZbpeV?editors=0010" rel="nofollow">http://codepen.io/naveennsit/pen/GZbpeV?editors=0010</a></p>
  
  <pre><code>var { Router, Route,browserHistory } = ReactRouter
  class First extends React.Component{
    sendValue(){
      browserHistory.push('/second');
    }
    render(){
      return (&lt;div&gt;
      &lt;input type='text' /&gt;
        &lt;button onClick={this.sendValue}&gt;send&lt;/button&gt;
      &lt;/div&gt;)
    }
  }
  
  class Second extends React.Component{
    render(){
      return &lt;div&gt;second component&lt;/div&gt;
    }
  }
  class Main extends React.Component{
    render(){
      return (
       &lt;Router history={browserHistory}&gt;
            &lt;Route path='/' component={First}&gt;&lt;/Route&gt;  
            &lt;Route path='/second' component={Second}&gt;&lt;/Route&gt;  
      &lt;/Router&gt;)
     }
  }
  React.render( &lt;Main /&gt;,document.getElementById('app'));
  browserHistory.push('/')
  </code></pre>