Sitemap
Press enter or click to view image in full size

在 reduce 使用點點點 spread operator 是效能上的 anti-pattern

Oct 3, 2022

--

隨著 functional programing 在 JavaScript 領域的盛行,跟 ECMAScript 標準的演進,JS 開發者在處理資料結構轉換上有了更多可以符合 immutable 的做法。於是下面的 pattern 越來越常在 array 轉成 object 裡面出現。

文章記錄在個人 blog,未來文章內容都會放在 blog,Medium 主要拿來做訂閱推播使用 https://jason-memo.dev/posts/spread-in-reduce-is-a-perf-antipattern/

--

--

陳冠霖
陳冠霖

Written by 陳冠霖

Yahoo Taiwan Sr. Frontend Engineer. Write something about web and React.js here.

No responses yet