Clicking "Export" locks the tab for about a second — the button does not even show its pressed state, and the spinner never appears. The export is pure JavaScript over data already in memory. Why does the spinner never render?

Answer it out loud before you open anything. The value of the flags below is in comparing them to what you actually said.

The situation behind the question

An analytics tool. The handler sets loading = true, then formats 40,000 rows into CSV, then sets loading = false and triggers a download. Users have learned to click Export twice because "the first click does nothing".

What it is really testing

Whether the candidate has an actual model of the event loop — task, microtask checkpoint, rendering opportunity — or only the folk rule "long loops are bad". The spinner is the discriminator: they must explain why a state update *before* the loop still produces no pixels.

Where the mechanism is taught