Tag

Microtasks

0 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 12, 2025 · Frontend Development

Understanding and Implementing Vue's nextTick Mechanism

This article explains the inner workings of Vue's nextTick function, detailing its callback queue, flushing logic, timer selection across environments, Promise‑based return, and provides a step‑by‑step JavaScript implementation with test cases and the full Vue source code.

JavaScriptMicrotasksPromise
0 likes · 10 min read
Understanding and Implementing Vue's nextTick Mechanism
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 24, 2023 · Frontend Development

Understanding JavaScript Event Loop, Microtasks and Macrotasks

This article explains JavaScript’s single‑threaded nature, the event loop mechanism, and the distinction between microtasks and macrotasks, illustrating their execution order with detailed code examples and step‑by‑step analysis to help developers grasp asynchronous behavior in front‑end development.

Event LoopFrontend DevelopmentJavaScript
0 likes · 7 min read
Understanding JavaScript Event Loop, Microtasks and Macrotasks
ByteFE
ByteFE
Nov 8, 2022 · Frontend Development

Understanding the JavaScript Event Loop in Browsers and Node.js

This article explains the fundamentals of JavaScript's event loop, covering browser asynchronous execution, macro‑ and micro‑tasks, timer inaccuracies, view rendering, and the differences in Node.js implementation, while providing code examples to illustrate execution order and practical implications for developers.

Event LoopJavaScriptMacrotasks
0 likes · 18 min read
Understanding the JavaScript Event Loop in Browsers and Node.js
Sohu Tech Products
Sohu Tech Products
Oct 19, 2022 · Fundamentals

Understanding the JavaScript Event Loop in Browsers and Node.js

This article explains the fundamentals of JavaScript's event loop, covering single‑threaded execution, the role of macro‑tasks and micro‑tasks, differences between browser and Node.js implementations, and includes code examples that illustrate task scheduling and execution order.

Event LoopJavaScriptMacrotasks
0 likes · 17 min read
Understanding the JavaScript Event Loop in Browsers and Node.js
Tencent Cloud Developer
Tencent Cloud Developer
May 31, 2021 · Frontend Development

Understanding Vue.nextTick and the JavaScript Event Loop

Vue.nextTick schedules callbacks using a graceful‑degradation chain (Promise, MutationObserver, setImmediate, setTimeout) that leverages the JavaScript event‑loop’s micro‑task queue, ensuring DOM mutations are applied instantly but rendered after microtasks and before macrotasks, while the browser’s multi‑threaded architecture coordinates rendering, timers, and network work.

Event LoopFrontend DevelopmentJavaScript
0 likes · 12 min read
Understanding Vue.nextTick and the JavaScript Event Loop
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Jul 12, 2019 · Fundamentals

Understanding Google V8 Engine Promise Implementation and the JavaScript Event Loop

This article explains the evolution of Google V8's Promise implementation, details the JavaScript single‑threaded event loop with macro‑ and micro‑tasks, describes various programming models, and walks through the internal V8 code that realizes Promise construction, chaining, and utility methods such as Promise.all and Promise.race.

Event LoopJavaScriptMicrotasks
0 likes · 10 min read
Understanding Google V8 Engine Promise Implementation and the JavaScript Event Loop