DEV Community

Discussion on: Learn Javascript Reduce method with 10 examples

fbolaji profile image

I rarely use Reduce in react as there more efficient methods to manipulate data as @lukeshiru mentioned.
I personal use all eas6 methods in React most of the time:
new Set()
and untility library such as lodash
then occasionally .reduce() .some()

Thread Thread
ramgendeploy profile image
Ramiro - Ramgen Author

I also rarely use reduce in react, but I was working with the context api the other day and it really was useful to know how the reduce method worked to understand the api (at least the part where there is reduce like syntax), but yea with array manipulation reduce is at the bottom of the list 😅