1

I have an async/await function as such:

async myfunction() {
  //CSS transition
  setTimeout(() => {
    //another CSS transition
  }, 500)
  await ... .then(... => {...});  
}

The problem is, my CSS transition in the setTimeout() goes off after the code in the .then() of await. Is it possible to force all the code before .then() to run first? I believe this has to do with the async nature of setTimeout() conflicting with the async await, but I'm not sure how to go around it. I'd appreciate any help. Thanks!

Adam.V
  • 779
  • 2
  • 9
  • 25

0 Answers0