Tagged articles
throttle
13 articles · Page 1 of 1
This article explains the core differences between debounce and throttle, provides hand-written implementations for both including immediate-execute and cancellable versions, compares timestamp vs timer-based throttling, maps each technique to common high-frequency scenarios like search suggestions and scroll loading, and demonstrates Vue 3 integration using VueUse or custom composables with cleanup.
JavaScriptVue 3VueUse
0 likes · 8 min read

This article analyzes the HarmonyOS ClickUtil library from @pura/harmony-utils V1.4.0, explaining throttle and debounce implementations with source code, interactive demos, and scenario-based selection guidance for preventing duplicate button clicks in mobile applications.
ArkTSClickUtilHarmonyOS
0 likes · 13 min read

This article explains how forgetting to remove event listeners can cause memory leaks, demonstrates proper listener cleanup, addresses closure pitfalls in loops, introduces event delegation, and provides practical debounce, throttle, naming conventions, and debugging techniques for robust frontend development.
Memory Leakdebounceevent delegation
0 likes · 16 min read

This article explains why repeatedly clicking an upload button can cause duplicate requests, UI confusion, and data errors, and presents three robust solutions—disabling the button, using a state flag, and why debounce or throttle are unsuitable—plus essential backend safeguards.
debouncefrontendstate-flag
0 likes · 9 min read

This article explains traditional and modern ways to implement debounce and throttle in JavaScript, covering classic functions, decorators, requestAnimationFrame, AbortController, Web Streams API, and third‑party libraries, with code examples, performance trade‑offs, and real‑world use cases.
Web APIsdebouncethrottle
0 likes · 6 min read

This article explains how to create Apple‑style scroll‑driven line and list‑item animations in a Vue3 website by using a normalized scroll formula, adjusting it for specific sections, and applying a throttle algorithm to keep the animations smooth and performant.
JavaScriptScroll AnimationVue3
0 likes · 8 min read

The article explains why repeated button clicks or searches cause duplicate API calls, discusses why debounce/throttle are not ideal, and presents three practical solutions—loading state locking, request cancellation with Axios CancelToken, and related code examples—to efficiently avoid redundant requests in Vue applications.
APIAxiosVue
0 likes · 7 min read

This article explains how to create a reusable Vue 3 directive that applies debounce and throttle to input events, addresses the extra triggers caused by Chinese IME composition, and provides complete TypeScript code examples and usage instructions.
DirectiveJavaScriptVue
0 likes · 9 min read

This article explains how closures and currying form the core of JavaScript functional programming, demonstrates multiple curry implementations, shows practical uses such as argument caching, debounce/throttle, and lodash utilities, and highlights their relevance for front‑end developer interviews.
CurryingJavaScriptclosures
0 likes · 14 min read

This article explains the fundamental differences between JavaScript throttle and debounce techniques using an intuitive real-world analogy, provides clear code implementations, compares their execution behaviors, and demonstrates practical usage scenarios with the Lodash library for optimizing frontend event handling.
Frontend DevelopmentJavaScriptdebounce
0 likes · 7 min read

This article explains the concepts of debounce and throttle in JavaScript, illustrates their principles and typical use cases such as button submissions, search suggestions, window resize, and drag‑and‑drop, and provides practical implementations with code examples and options for immediate execution, timestamps, and timers.
JavaScriptdebounceevent handling
0 likes · 7 min read

This article explains the concepts, implementations, and practical use cases of debounce and throttle in JavaScript, showing how they limit function call frequency to improve front‑end UI performance for events such as scrolling, resizing, and input handling.
JavaScriptdebouncefrontend
0 likes · 7 min read

This article details how the Qidian reading page was optimized by advancing the scroll trigger, continuously preloading upcoming chapters, and applying a throttled scroll handler, resulting in sub‑second load times, minimal loading indicators, and a smoother user experience.
frontendoptimizationperformance
0 likes · 9 min read
