useState questions
Unanswered
Gecco posted this in #help-forum
GeccoOP
hi there, I am trying to implement a function in my code that requires me to be sure the desired value was updated in useState prior to continueing, is there a way to in sorts await for the completion and updating of useState before continuing? Thanks
2 Replies
@Gecco hi there, I am trying to implement a function in my code that requires me to be sure the desired value was updated in useState prior to continueing, is there a way to in sorts await for the completion and updating of useState before continuing? Thanks
you can check the useState value before execution. If it's not set yet, promt a message or if it's set, continue executing the function
In addition to help you more, please provide more information