title: Get props value in method react/redux
body: <p>I am very new to react and redux. I have created an application using react/redux. I have implemented routing in the application and also have able to manage the state using redux. Now my problem is After set the state i am only able to get the props in render() not anywhere in the component. below are my code,</p>
  
  <pre><code>export class EmpSearch extends React.Component {
  
  constructor(props) {
  super(props);
  this.state = {
      Empnumber: ''
  };
  }
  
  EmpSearch = (e) =&gt; {    
   if (e.key === 'Enter') {
   browserHistory.push('/Emp/' + e.target.value); 
   }
   }
  
  updateEmpNumber(e) {
  
   this.props.dispatch({
          type: 'UPDATE_EMP_NUMBER',
          payload: e.target.value
      });
     }
  
   render() {
     return (
       &lt;div className="row"&gt;
      &lt;form&gt;
      &lt;div className="form-group"&gt;
      &lt;label htmlFor="Empnumber"&gt;Emp Number&lt;/label&gt;
      &lt;input type="text" className="form-control" id="Empnumber" placeholder="Emp Number" value={this.props.Empnumber} onChange={this.updateEmpNumber.bind(this)} onKeyPress={this.EmpSearch}/&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  &lt;/div&gt;
   );
   }
    }
   function mapStateToProps(state){
    return {
  Empnumber: state.Empnumber
   }
  }
  
   export default connect(mapStateToProps)(EmpSearch);
  </code></pre>
  
  <p>I want to pass the value to below component but instead of passing and getting value to render i want to create a method and want to pass the props there only.</p>
  
  <pre><code>class EmpDetail extends React.Component {
  render() {
      const empNumber = this.props.Empnumber;
      return (
          &lt;div className="container"&gt;
              Empnumber = {empNumber}
          &lt;/div&gt;
      );
  }
   }
  
   function mapStateToProps(state){
     return {
      Empnumber: state.Empnumber
   }
   }
  
  export default connect(mapStateToProps)(EmpDetail);
  </code></pre>
  
  <p>I am successfully able to get the props value in render but could not in function.I have tried a lot to to create a method and pass the props to the method and get the props value but could not. Please help me out.</p>