arrow_backBACK TO DRILLS
Blue Beltstate-snapshotsPREMIUM
Async stale state in delayed updates
A component tracks pending requests. Inside an async click handler, it runs:
REACT_MODULE // 0x42
setPending(pending + 1);
await delay(3000);
setPending(pending - 1);Why can the counter become negative?