Tag

requestIdleCallback

1 views collected around this technical thread.

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.

MessageChannelTime Slicingfrontend
0 likes · 14 min read
React Scheduler: Implementing Idle‑Time Execution and Time Slicing with requestAnimationFrame, postMessage and MessageChannel
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 17, 2022 · Frontend Development

Deep Dive into requestIdleCallback API and Its Use with React

This article explains the requestIdleCallback web API, its syntax, execution timing, task‑queue handling, performance characteristics, compatibility issues, and practical integration with React and requestAnimationFrame to off‑load low‑priority work without blocking UI rendering.

Idle TasksJavaScriptWeb API
0 likes · 14 min read
Deep Dive into requestIdleCallback API and Its Use with React