The Ref Escape Hatch: React Hooks for Stale Closures, Stable Callbacks, and Force Updates
Every function component re-runs from scratch on every render, and every closure created during that render captures the props and state as they were at that moment. That is the whole React model in o
reactuse.hashnode.dev11 min read