Comment Comment by romellem It is too easy to write O(n^2) code using reduce, in fact I wrote an eslint rule to catch a common pattern I see other developers write.- https://github.com/romellem/eslint-plugin-no-spread-in-reduc...It catches code that looks like this: items.reduce((acc, item) => { return { ...acc, [item.id]: item }; }); parent romellem 1 month ago
- https://github.com/romellem/eslint-plugin-no-spread-in-reduc...
It catches code that looks like this: