title: Is this correct implementation, putting props inside this.setState and also please consider here I am using componentDidMount()
body: <p>I know it is wrong to initialize props inside the state, but is there any other way of doing this ?</p>
  
  <p>Is using useEffect() hook the only other way , than how to use it ?</p>
  
  <pre><code>componentDidMount (){
  ...
  if(this.props.house.rent){
   this.setState({rent:this.props.house.rent});
  
  }
  }
  </code></pre>