title: Function execution based on state, doesn't work correctly
body: <p>I want to change the temperature from Celsius to Fahrenheit (and vice-versa) but I haven't found the correct approach to tackle this, I wrote a function that does the Celsius to fahrenheit conversion but it throws me an error. So I need someone that is able to open my brain and explain this to me haha (make me understand is what I'm saying).</p>
  
  <p>Here is my code: <a href="https://codepen.io/manAbl/pen/aGymRg?editors=0011" rel="nofollow noreferrer">https://codepen.io/manAbl/pen/aGymRg?editors=0011</a></p>
  
  <p>And I put in a comment the following function, that is the one that is not working: </p>
  
  <pre><code>convertingTemperature() {
  const { Fahrenheit, Celcius } = this.state;
  
  this.setState({
    Fahrenheit: true,
  });
  
  const _Celcius = this.state.weather.weather &amp;&amp; this.state.weather.main.temp;
  
  const _Fahrenheit = Math.round(_Celcius * 5 / 9 + 32);
  
  if(Fahrenheit) {
    this.setState({ temp: _Fahrenheit })
  };
  </code></pre>
  
  <p>}</p>
  
  <p>What I want to do is hold on my state a boolean so if the fahrenheit is true,  I can do the conversion and I call my function, but the reason I think is not working is because I'm pulling out the value from my weather state object, that comes from my api call. So I want to pull out that value, into a separate state so I can make the conversions with it.</p>
  
  <p>--- What I want to say with this is that I want to be able to toggle between fahrenheit and celsius when clicking the temperature</p>