arrow_backBACK TO DRILLS
Blue Belt - Mediumstate-snapshotsPREMIUM
Async Click Handler With A Delay
A component tracks pending requests. Inside an async click handler, it runs:
//REACT_MODULE
setPending(pending + 1);
await delay(3000);
setPending(pending - 1);Why can the counter become negative?