藥不藥來當工程師
一個不務正業的藥師,誤打誤撞來當了前端工程師。斜槓工程師的人生!
array
2026
為什麼 .reverse() 讓瀏覽器凍結?Vue Reactivity 與 Array In-Place Mutation 的陷阱
2026-03-18
2026-03-18
在一個 Vue 3 專案中,我把一行 .sort() 改成 .reverse(),結果瀏覽器直接凍結。這篇文章記錄這個問題的根本原因:在 reactive context 中對陣列做 in-place mutation 可能觸發無限迴圈,以及為什麼 ES2023 的 toReversed() / toSorted() 是更安全的選擇。
Blog Archive
2026 (5)
三月 (2)
為什麼 .reverse() 讓瀏覽器凍結?Vue Reactivity 與 Array In-Place Mutation 的陷阱
用 invisible absolute 解決 Chart.js 在隱藏 Tab 中匯出空白圖片的問題
一月 (3)
從 100 行 Regex 到 Lucene Parser:複雜驗證邏輯的重構之路
使用 Observer Pattern 重構複雜的資料上傳流程 - 以 PrimaryAPI 與 BackupService 整合為例
在 Cloud Run 被 OOM 教訓的一課:用 Stream 把記憶體從 O(N) 降到 O(1)
2025 (4)
十二月 (3)
TypeScript 5.5+ Inferred Type Predicates:告別手動標註 `item is string`
Nuxt3 中 $fetch 與 axios 在模組頂層的差異
Import Alias:~ vs @ 在不同框架的慣例
一月 (1)
旅遊規劃網站電腦版居然是 Vue dev mode!?
2024 (4)
十二月 (1)
Nuxt3 Nested Routes 與 active class
三月 (1)
參與高股息 ETF 除息前行情
二月 (2)
macOS 合併 Google Drive 壓縮下載
2024 新年新希望 重啟部落格
2021 (1)
六月 (1)
台股上市上櫃處置股 Google 行事曆 (每日更新)
2020 (1)
十月 (1)
利用 Nuxt.js 與 nuxt/content 搭建部落格 (1)
Tags
vue (6)
typescript (5)
vue3 (5)
nuxt (4)
nuxt3 (4)
隨筆 (4)
javascript (3)
google (2)
stock (2)
vue-router (2)
前端開發 (2)
台股 (2)
技術筆記 (2)
$fetch (1)
00713 (1)
00878 (1)
00919 (1)
00929 (1)
00939 (1)
00940 (1)
ETF (1)
array (1)
ast (1)
axios (1)
backend (1)
bash (1)
bigquery (1)
canvas (1)
chart.js (1)
cloud run (1)
css (1)
design-pattern (1)
display-none (1)
es2023 (1)
finlab (1)
google calendar (1)
google drive (1)
jamstack (1)
lucene (1)
mac (1)
memory leak (1)
next.js (1)
node.js (1)
nodejs (1)
nuxt content (1)
nuxt2 (1)
observer-pattern (1)
ofetch (1)
oom (1)
parser (1)
peg.js (1)
pinia (1)
python (1)
react (1)
reactivity (1)
refactoring (1)
regex (1)
scrollable-overflow (1)
stream (1)
toReversed (1)
toSorted (1)
type-predicates (1)
type-safety (1)
validation (1)
visibility (1)
vue2 (1)
旅遊 (1)
日本 (1)
閒聊 (1)
高股息 (1)
高股息 ETF (1)