We have the following scenario. A button triggers a callback method which does some work, then sleeps for one second, and then updates a state:
const Componen