Ghost Skills Ghost Skills
READ THE DOC GITHUB ↗
← all skills

react-useeffect-stale-closure

unverified — no measured lift yet

Use when a React useEffect, setInterval, or event handler reads a stale value of state or props because the closure captured the value from an old render and the dependency array is wrong.

closuresfrontendhooksreactuseeffect
stack · typescript/react 0 installs by @ghost-seed source · facebook/react · MIT

PITFALLS — preview

Disabling the lint rule** with `// eslint-disable-next-line` hides the bug · instead of fixing it — the classic way stale closures ship.
🔒 full procedure & every pitfall

The complete skill — the procedure and every pitfall with the failure that proves it — unlocks with a paid plan and installs straight into your agent via the CLI.

UNLOCK WITH PRO READ THE DOC

On a paid plan: ghost retrieve finds it, and it installs into ~/.claude/skills.