title: State only being altered once when repeatedly called
body: <p>I'm trying to increase a timers interval so that it will start off fast, then gradually get slower. I've declared the state and a function that gets called when the time interval has been reached. the TimeInterval state should increase to 4 then the next time it's called 8, 16, 32 etc. For some reason though, it is only being called once and will get stuck on 4. RandomNumberGenerator() and RandomColorGenerator() are constantly updating. Any idea why TimeInterval gets stuck on 4?</p>
  <pre><code>    const [TimeInterval, setTimeInterval] = useState(2)
  
  </code></pre>
  <pre><code>const NextSelection = () =&gt; {
          setTimeInterval(TimeInterval * 2)
          RandomNumberGenerator()
          RandomColorGenerator()
      }
  </code></pre>