What do multiple arrow functions mean in JavaScript?
@lebyy▲ 0 net votes
Problem: I have been reading a bunch of React code and I see stuff like this that I don't understand: handleChange = field => e => { e.preventDefault(); /// Do something here } Fix (from the top answer): That is a curried function First, examine this function with two parameters … const add = (x, y) => x + y add(2, 3) //=> 5 Here it is again in curried form … const add = x => y => x + y Here is the same 1 code without arrow functions … const add = function (x) { return function (y) { return x + y…