title: ComponentWillReceiveProps not triggered
body: <p>I am new to the React world.I got stuck on lifecycle methods while doing edit operation.</p>
  
  <p>componentWillReceiveProps method is not triggered even if props are changed.</p>
  
  <p>Here is my code sample.</p>
  
  <pre><code>      this.intialState = {
                        name:'',
                        code:'',
                        };
      this.state = this.intialState;
  
  
  
  
    componentWillReceiveProps(nextprops){
        this.setState({
          name:nextprops.KaraikarEdit.name,
          code:nextprops.KaraikarEdit.code
       })
      }
  
  
  
  render() {
  
  
   return (
                  &lt;div className="form-group"&gt;
                  &lt;input type= "text"  className="form-control" value={this.state.name}  placeholder="Enter Name" name="name"   onChange = {this.onhandleChange} /&gt;
                  &lt;/div&gt;
  
                  &lt;div className="form-group"&gt;
                  &lt;input type= "text"  className="form-control" value={this.state.code}  placeholder="Enter Code" name="code"   onChange = {this.onhandleChange} /&gt;
                  &lt;/div&gt;
  
  );
  }
  
   const mapStateToProps = (state) =&gt; {
      return {
  
               KaraikarEdit: state.KaraikarDetails.editdata
           }
    }
  
  
  export default connect(mapStateToProps)(KaraikarMasterAdd);
  </code></pre>
  
  <p>I received newprops in KaraikarEdit. but componentWillReceiveProps lifecycle method is not fired.</p>
  
  <p>I Know componentWillReceiveProps isn't called on the first render.so i made use of componentDidMount method and in this method i dispatched a action that is useless for this component.Then componentWillReceiveProps is working.</p>
  
  <p>Should i use componentDidMount or componentWillMount method inorder to use componentReceiveProps method? if so what to include in componentDidMount method?</p>