Skip to content
JavaScript·Intermediate·Conceptual·1 min read

Where does rendering occur relative to JavaScript?

Short interview answer

The browser may render between tasks when the rendering opportunity is due, after microtasks have drained. Long tasks and microtask starvation prevent that opportunity, which is why splitting CPU work only with resolved promises may not restore responsiveness.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Event loop

Related questions