DEV Community

Discussion on: Why you should use reduce instead of loops -- Part I

Collapse
 
krzysztofmiemiec profile image
Krzysztof Miemiec

I think that your utility may end up looking like rxjs 😉 Nevertheless, I get the point that internally optimized, general-purpose reducers can be a cool internal utility for executing loops in a clean & easy-to-read manner. As a performance freak, I'm quite surprised that this approach is that performant. I'll try to use something similar in one of the products I'm working on! Thanks for the article 💪🏻