Glossary coding Term Page

requestAnimationFrame

Schedule measurement or animation callbacks for the upcoming frame.

request-animation-frame #performance#javascript
Korean version

Aliases

rafrequestAnimationFrame

Related Concepts

Core Idea

requestAnimationFrame (rAF) queues your callback to run before the next repaint, giving the browser room to coalesce DOM writes and reads. Using it to batch measurement or animation work keeps render loops smooth and in sync with refresh rates.

Why It Matters Here

Mathbong frames rAF as the antidote to layout thrashing. By reading layout once per frame, the series’ UI helpers maintain predictable performance even when paired with observers, lazy loading, or resize logic.

Posts Mentioning This Concept