Break_vues_reactivity

This article won’t do a deep dive into the implementation of Vue.js reactivity, I just want to show some examples that will break the reactivity when you are writing with the framework. Should you be interested in the mechanism of the reactivity under the Vue.js, here are some information I think that would help: Reactivity in depth | Vue.js Vue 3 Reactivity | Vue Mastery Vue JS 3 Reactivity Fundamentals - Composition API by Marius Espejo TL;DR Primitive value props cannot be modified from the child component....

February 28, 2023 · Yu-Pang

Debounce 和 Throttle

針對像是輸入、鼠標移動,和頁面滾動…等可能在短時間被使用者大量觸發的事件做觸發限制, debounce 是群組短時間觸發的多個事件成一次執行的動作 throttle 是觸發事件後進入冷卻時間 避免網頁在短時間內要對大量觸發的事件做出反應,而花費過多處理效能。 Live demo and source code on stackblitz

November 19, 2022 · Yu-Pang