React

Stale closure

An effect or callback capturing values from an earlier render because a dependency was omitted.

Why interviewers ask about it

The classic 'why is my counter stuck at 0'. The effect closes over the render that created it; the deps array is what forces recreation.

This term is part of the free Python Full-Stack interview preparation module - browse the full glossary for every definition.