title: React State show as NaN
body: <p>I am trying to setState from previous Props using, now, the deprecated componentWillReceiveProps like below</p>
  
  <pre><code>componentWillReceiveProps(props) {
    this.setState({
      temp: Math.round(((props.weather.temp-273.15)*1.8)+32)
    })
  console.log(this.state)
  }
  </code></pre>
  
  <p>The problem I am facing is when I do this, when the app updates, the state is <strong>NaN</strong> for 1 second before becoming the correct number. </p>
  
  <p>I tried using componentWillMount(){} instead, but not only is that not a good lifecycle to use for setting state, the previous props <em>are not available during this time</em></p>
  
  <p>How can I prevent this NaN from appearing in the rendered DOM and only show the state?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>You are all correct. I was more concerned with whether there should be a lifecycle or React specific handler to resolve this kinda issue. I guess it's true that React is mostly comprised of plain ol' javascript.</p>