The Escape-key listener you cannot fix with a dependency array
A dev.to walkthrough of React's useEventListener makes the case plainly: subscribe-once and call-the-newest-handler are incompatible deps, so the pattern moves the handler into a ref.
Reality
- Evidence58
- Adoption
- Insufficient
- Hype gap+14
- Incentives45
- Confidence46