I have an app that involves lots of calculations and quite a few variables. My understanding is that when you update State, there is a lag before the state variable gets updated. Consequently, it seems that you might end up with incorrect calculations in your formulas if you use State. Or at least it seems that way to me with my limited understanding.
So, I have been using a mixture of State and just basic variables. But I have a really unclear understanding of when I should be using State verses when I should be using just a basic (or global) variable in my app.
Is my understanding above incorrect? Does someone have an answer to this conundrum?