Tagged articles

requestIdleCallback

5 articles · Page 1 of 1
JavaScript
JavaScript
Nov 29, 2025 · Frontend Development

Why setTimeout Falls Short and How requestIdleCallback Keeps Your UI Smooth

The article explains how the browser’s single‑threaded nature makes long JavaScript tasks block rendering, outlines the timing issues of setTimeout, introduces requestAnimationFrame for visual sync, and shows how requestIdleCallback can safely schedule low‑priority work during idle periods.

Browser APIsJavaScriptrequestAnimationFrame
0 likes · 4 min read
Why setTimeout Falls Short and How requestIdleCallback Keeps Your UI Smooth
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 22, 2022 · Frontend Development

React Scheduler: Implementing Idle‑Time Execution and Time Slicing with requestAnimationFrame, postMessage and MessageChannel

This article explains how React simulates requestIdleCallback by combining requestAnimationFrame, postMessage, and MessageChannel to execute work during browser idle periods, detailing the evolution from the early rAF‑postMessage approach in v16 to the message‑loop implementation in v18 and providing simplified source code examples.

FrontendMessageChannelReAct
0 likes · 14 min read
React Scheduler: Implementing Idle‑Time Execution and Time Slicing with requestAnimationFrame, postMessage and MessageChannel
ELab Team
ELab Team
Oct 21, 2021 · Frontend Development

How React Fiber Leverages requestIdleCallback: Deep Dive & DIY Implementation

This article explains the concept of requestIdleCallback, its limitations, and how React Fiber implements a custom idle‑time scheduler using requestAnimationFrame and MessageChannel, complete with code demos and analysis of the underlying React source.

Frontend PerformanceJavaScriptMessageChannel
0 likes · 12 min read
How React Fiber Leverages requestIdleCallback: Deep Dive & DIY Implementation