In my 10+ years as a JS dev, I’ve seen this pattern in numerous code bases. Inevitably it leads to bugs and confusion.
Currying can lead to code that looks simpler, but I believe it hides real complexity in a non-obvious way. Well-named wrapper functions like ‘logNow’ can be great, but arbitrary curried functions are too tricky to keep track of on teams that include juniors, backend engineers and experienced senior FE too.
I've never seen it abused, maybe just because the team cultures didn't lend themselves to that, but I have used it in one or two places myself where it was very helpful. The main one that comes to mind is pre-binding callback to be passed down to react components, so that the exact same function instance can be passed on each re-render of the parent component and the child component doesn't get triggered to render
What are some ways you've seen it abused in JS projects?
Currying can lead to code that looks simpler, but I believe it hides real complexity in a non-obvious way. Well-named wrapper functions like ‘logNow’ can be great, but arbitrary curried functions are too tricky to keep track of on teams that include juniors, backend engineers and experienced senior FE too.